Operator Precedence | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson

Operator Precedence

>>> False == False or True True >>> False == (False or True) False >>> (False == False) or True True I've been staring at this for awhile, I don't get it.

22nd Nov 2016, 8:37 PM
DreamANight - avatar
1 Answer
well, it's working exactly as it should. in python, comparison operators have a higher precedence than boolean operators, but a lower precedence than the bracket.
22nd Nov 2016, 10:38 PM
Rill Chritty
Rill Chritty - avatar