Confusion on if statements, Pyg Latin 5/10


I tried to use the .isalpha with an if statement. Here is how it read:
if len(original) > 0 and original.isalpha() = True:
I was told by the program that the second portion of the statement should not have the "= True" attached to it, but the first part is supposed to have the ">0." What is the difference?


The first is checking to see if the length is greater than zero, so it is true or false.

The second is checking if original .isalpha, which gives a true or false value.

original.isalpha() = True
You don't put '= True' because = is for assignment,
and == is for comparison.

You don't need to compare it at all because .isalpha
will be either True or False.


My if statement always prints Empty even when a word is entered. What am I doing wrong?
The code:
print 'Welcome to the Pig Latin Translator!'

original = raw_input("Enter an English word:")
print original

original = ""
if len(original) > 0:
print original
print "empty"

The output is:
Welcome to the Pig Latin Translator!
Enter an English word: foot

empty is wrong. It should say foot again


If I set original > "" it runs as expected. Why?