Boolean confusion

Frantisek Fuka fuka at fuxoft.cz
Fri Oct 31 13:37:25 EST 2003


Can anyone please explain why these two give different results in Python 
2.3?

 >>> 'a' in 'abc' == 1
False
 >>> ('a' in 'abc') == 1
True

I know it's not a good idea to compare boolean with Integer but that's 
not the answer to my question.

-- 
                                          Frantisek Fuka
(yes, that IS my real name)
(and it's pronounced "Fran-tjee-shek Foo-kah")
----------------------------------------------------
My E-mail:   fuka at fuxoft.cz
My Homepage: http://www.fuxoft.cz
My ICQ:      2745855





More information about the Python-list mailing list