-
How does one run something like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can do this: (x == y) & (y == z) Note that the parentheses are required here due to operator precedence rules.
Side note here, but it fails for a different reason: Python treats operator chaining like |
Beta Was this translation helpful? Give feedback.
You can do this:
Note that the parentheses are required here due to operator precedence rules.
Side note here, but it fails for a different reason: Python treats operator chaining like
x == y == z
as equivalent to(x == y) and (y == z)
, and theand
keyword will try to cast the things on either side tobool
, andbool(x == y)
fails.