When does True == True

2014-08-28 Thread Seymore4Head
import math import random import sys pigword=Razzamattaz print (Pig Latin) print (Pick a word containing only alphabetical characters,pigword) if len(pigword) 0: print (pigword) else: print (empty) if pigword.isalpha() == True: print (pigword) print (True) else: print (WTF)

Re: When does True == True

2014-08-28 Thread Andrew Berg
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():. --

Re: When does True == True

2014-08-28 Thread Joel Goldstick
On Aug 28, 2014 4:45 PM, Seymore4Head Seymore4Head@hotmail.invalid wrote: import math import random import sys pigword=Razzamattaz print (Pig Latin) print (Pick a word containing only alphabetical characters,pigword) if len(pigword) 0: print (pigword) else: print (empty) if

Re: When does True == True

2014-08-28 Thread Seymore4Head
On Thu, 28 Aug 2014 15:52:48 -0500, Andrew Berg aberg...@my.hennepintech.edu wrote: 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