0
Operator precedence
print(False == True or True) In the above code, output is True If == takes precedence over or, then shouldn't output be False as False is not equal to True.
2 Respuestas
+ 2
I think it's because it evaluates false == true first which is false, and then it checks to see if the left or right of the or operator is true, if either side is true it will return true.
false | true <right side also gets checked //true
only left side gets checked > true|false //true
false|false > both sides would get checked //false
also this is how these work.
true == true // true
false == true // false
false == false // true
0
Thanks Mathews. Understood.