0
Why the answer is 0?
4 ответов
+ 3
9<9.0 returns False. False as an int is 0. Everything above is True
+ 3
In Python, booleans are integers with Batman suits.
False is actually 0, and True is actually 1.
Only their representation is different.
+ 2
9 is not less than 9.0, as such the evaluation of `9 < 9.0` expression yields False, which in numerical state (converted boolean to integer precisely) be zero.
Hth, cmiiw
0
Thank you