I am learning python, but I\'m a bit confused by the following result.
In [41]: 1 == True Out[41]: True In [42]: if(1): ...: print(\'111\') ...:
I believe it's 1 == True here is that's weird, not that ... != True.
1 == True
... != True
1 equals with True because in Python booleans are subclass of integers (because of PEP-285). See yourself:
1
True
>>> issubclass(bool, int) True