+ 1
Why 1>0==0 is True on Python?
Could someone give me an answer, please? Thankyou!
5 ответов
+ 12
Raffaele Bisogno let's break this down as 1>0 which is True and 0 == 0 is True so combined as 1>0==0 is True
however print((1>0)==0) is False
https://code.sololearn.com/cQD4bTK3fOpl/?ref=app
+ 8
I answered very similar question on stackoverflow 👇
https://stackoverflow.com/questions/64691582/why-21-false-output-false-in-python3/64692257#64692257
+ 3
Yes Raffaele Bisogno
+ 2
BroFar , so, if I understand, it's like if you write (1>0 and 0==0), isn't it?
Thanks!
+ 1
1 value is true and 0==0 is true