0
Operator Precedence
>>> False == False or True True >>> False == (False or True) False >>> (False == False) or True True Please explain this more simply.
2 ответов
+ 1
The equality operator "==" has a higher precedence as the "or" operator, so first the statement with "==" is solved, after that the "or" is solved. Parentheses have higher precedence as "or" and "==", so the statement inside them is solved first.
+ 1
First
False == False --> True, True or True --> True
Second
False or True --> True, True == False --> False
Third
False == False --> True, True or True --> True