3 Respostas
+ 5
No, it's not correct.
Boolean AND has higher precedence than boolean OR.
https://docs.python.org/3/reference/expressions.html#operator-precedence
+ 3
Paolo De Nictolis hi,
First 0 and 0 get evaluated which becomes 0 then (1 or 0) remains which evaluated
1 or 0 is evaluate and gives 1 so output comes as 1
Have some 🍎 🍎 🍎 🍎 🍎
+ 2
And if my conclusion is correct, why does print(1 or 0 and 0) outputs 1?