python boolean opeator优先级
1.有三个布尔操作:not, and, or
2. 优先级
[*]notisevaluated first;
[*]andisevaluated next;
[*]orisevaluated last.
3. 通过加( )可以改变计算顺序 例子:
1. 在console输入:
not not True or False and not True
输出是:True
2. 在console输入:
(not not True or False) and not True
输出是:False
页:
[1]