Check Yourself


Oops, try again. The original variable ("hello") had more than 0 characters but did not get printed.

Should have printed "hello"

print 'Welcome to the Pig Latin Translator!'

# Start coding here!
original = raw_input("Enter a word:")

empty_string = ""

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


Hi instead of empty_string you should use original since its where you saved the raw_input()


With things like this you can simply test the truthiness of the variable because any thing empty in python is considered False.

So just doing,

a = 'String'
if a:
# OUTPUT: String


That did it!

The lesson loads up "len(empty_string)" by default, so I just didn't notice that. Appreciate the help!