+ 1

Why 1>0==0 is True on Python?

Could someone give me an answer, please? Thankyou!

6th Dec 2020, 11:24 PM
Raffaele Bisogno
Raffaele Bisogno - avatar
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
6th Dec 2020, 11:29 PM
BroFar
BroFar - avatar
7th Dec 2020, 2:02 AM
Arsenic
Arsenic - avatar
7th Dec 2020, 2:02 PM
BroFar
BroFar - avatar
+ 2
BroFar , so, if I understand, it's like if you write (1>0 and 0==0), isn't it? Thanks!
7th Dec 2020, 1:37 PM
Raffaele Bisogno
Raffaele Bisogno - avatar
+ 1
1 value is true and 0==0 is true
8th Dec 2020, 3:38 PM
Sayyam Jain
Sayyam Jain - avatar