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

针对逻辑运算的进⼀一步研究:
  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

猜你喜欢

转载自www.cnblogs.com/gaoyuechen/p/12394850.html