Possible Duplicate:
Why can't Python handle true/false values as I expect?
False = True should raise an error in this case.
False = True
True == False
True
True + False == True?
if True + False:
print True
True
True Again?
if str(True + False) + str(False + False) == '10':
print True
True
LOL
if True + False + True * (False * True ** True / True - True % True) - (True / True) ** True + True - (False ** True ** True):
print True, 'LOL'
True LOL
why this is all True?
Falseis just a global variable, you can assign to it. It will, however, break just about everything if you do so.Note that this behavior has been removed in python3k
also,
int(False)== 0 andint(True)== 1, so you can do arbitrary arithmetic with them