When does True == True

Andrew Berg aberg010 at my.hennepintech.edu
Thu Aug 28 16:52:48 EDT 2014


On 2014.08.28 15:38, Seymore4Head wrote:
> What am I doing wrong?
>>> True == True
True
>>> True == "True"
False
>>> type(True)
<class 'bool'>
>>> type("True")
<class 'str'>

Also, if is already a boolean test, and it is more Pythonic to simply write "if
pigword.isalpha():".



More information about the Python-list mailing list