+ 5
Comparison operators can be "chained" in Python. https://docs.python.org/3/reference/expressions.html#comparisons a < b < c is evaluated as a < b and b < c Likewise 1 > n <= 9 is evaluated as 1 > n and n <= 9 Since n = 10, this evaluates to false.
14th May 2020, 2:35 PM
Hatsy Rei
Hatsy Rei - avatar
+ 1
Basically, it reads expressions from left to right.
15th May 2020, 4:46 PM
Shivesh Gupta
0
emm, 10 > 9
19th May 2020, 11:33 AM
brnfrdy
brnfrdy - avatar