It's NOT
, AND
, OR
,根据文档从最高到最低运算符优先级 https://docs.python.org/3/reference/expressions.html#operator-precedence
这是完整的优先级表,从最低优先级到最高优先级。行具有相同的优先级并从左到右分组
0. :=
1. lambda
2. if – else
3. or
4. and
5. not x
6. in, not in, is, is not, <, <=, >, >=, !=, ==
7. |
8. ^
9. &
10. <<, >>
11. +, -
12. *, @, /, //, %
13. +x, -x, ~x
14. **
14. await x
15. x[index], x[index:index], x(arguments...), x.attribute
16. (expressions...), [expressions...], {key: value...}, {expressions...}