码迷,mamicode.com
首页 > 编程语言 > 详细

python 逻辑运算符 () > not > and > or

时间:2020-03-02 12:30:38      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:false   逻辑运算符   and   逻辑   pytho   运算   判断   python   针对   

针对逻辑运算的进?一步研究:
  1, 在没有()的情况下not 优先级?高于 and,and优先级?高于or,即优先级关系为( )>not>and>or,同?一优先级从左往
右计算。
() > not > and > or
例例题:
判断下列列逻辑语句句的True,False。
3>4 or 4<3 and 1==1
1 < 2 and 3 < 4 or 1>2
2 > 1 and 3 < 4 or 4 > 5 and 2 < 1
1 > 2 and 3 < 4 or 4 > 5 and 2 > 1 or 9 < 8
1 > 1 and 3 < 4 or 4 > 5 and 2 > 1 and 9 > 8 or 7 < 6
not 2 > 1 and 3 < 4 or 4 > 5 and 2 > 1 and 9 > 8 or 7 < 6

python 逻辑运算符 () > not > and > or

标签:false   逻辑运算符   and   逻辑   pytho   运算   判断   python   针对   

原文地址:https://www.cnblogs.com/gaoyuechen/p/12394850.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!