+ 1
[SOLVED] Why is print(1<(2>1)) False?
(I) print(1<2>1) = True, (II) But print(1<(2>1)) = False; (III) Correspondingly, print(1<2>1 == 1<(2>1)) = False. What is the logic behind II? Please explain.
1 Antwort
+ 4
1) 1<2>1 means in python 1>2 and 2>1. It's true
2) 1<(2>1) means (2>1) is true=1 then 1<(1) is false.
3) true == false => false