| Python Library Reference |
These are the Boolean operations, ordered by ascending priority:
| Operation | Result | Notes |
|---|---|---|
x ory | ifx is false, theny, elsex | (1) |
x andy | ifx is false, thenx, elsey | (1) |
notx | ifx is false, then1, else0 | (2) |
Notes:
nota ==b is interpreted asnot (a ==b), anda == notb is a syntax error.| Python Library Reference |