Re: When does True == True

2014-08-28 Thread Seymore4Head
On Thu, 28 Aug 2014 15:52:48 -0500, Andrew Berg wrote: >On 2014.08.28 15:38, Seymore4Head wrote: >> What am I doing wrong? True == True >True True == "True" >False type(True) > type("True") > > >Also, if is already a boolean test, and it is more Pythonic to simply write "if >p

Re: When does True == True

2014-08-28 Thread Joel Goldstick
On Aug 28, 2014 4:45 PM, "Seymore4Head" 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 pigword.

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) >>> type("True") Also, if is already a boolean test, and it is more Pythonic to simply write "if pigword.isalpha():". -- https://mail.python.org/mailman/listinfo/pytho

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: pr