+ 3

[SOLVED] Explain why unexpected results ?

print(True, False==True, False) #True False False why not True False False True ?

8th Oct 2020, 3:01 AM
Ratnapal Shende
Ratnapal Shende - avatar
1 Réponse
+ 6
print(True, False==True, False) has only three expressions, not four. They are True, False==True, False See, False==True is recognized as a single expression that evaluates to a final value of False before it gets printed.
8th Oct 2020, 3:35 AM
Brian
Brian - avatar