+ 3
How operator precedence work in Python? I found in many comments that it is and or not and in the table it shows "not and or"
6 Respuestas
+ 3
Ashutosh Joshi Your code comments match my understanding of the operator precedence.
+ 8
Highest to lowest precedence:
+
==
not
and
or
https://docs.python.org/3/reference/expressions.html#operator-precedence
+ 8
I also had doubt in it thank you for explaining.
+ 5
I used it here
https://code.sololearn.com/cOgB9UfjI1vp
+ 3
I tried to evaluate using not>and>or and it works. I have mentioned it in the code as comment. Need to confirm whether I understood it properly or not.
Thanks😀
+ 3
Interesting! I tend to just use parentheses for clarity and to avoid this mess.