Why in Python
False==0
gives True
and why is not used in the set
function? That is, here is the line:
print set([False, 0])
allows you to display:
set([False])
Where did 0 go? All because ==
?
By the way, such a line print set([1, True])
gives the result set([1])
. Why did True
disappear this time, but 1 remained?
Are True and False just macros for 0 and 1? But why then True is 1
gives False
?
#define True 1
? - faoxis