2011/3/19 Yaşar Arabacı <[email protected]> > >>>a=5 > >>>b=5 > >>>a == b > True > >>>a is b > True > > My question is, why "a is b" is true. What I expected it to be is that, a > and b are different things with same value. > > _______________________________________________ > Tutor maillist - [email protected] > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor >
True means not zero, not "". Any numeric value but 0 is true. so you have True and True. I think what you are thinking of would be a == b. Since a does not equal b, the result is False -- Joel Goldstick
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
