Numbers and truth values

Szabolcs szhorvat at gmail.com
Sat Apr 28 14:33:23 CEST 2007


Newbie question:

Why is 1 == True and 2 == True (even though 1 != 2),
but 'x' != True (even though  if 'x':  works)?



More information about the Python-list mailing list