Unsure how to define the empty string?


#1



https://www.codecademy.com/courses/python-beginner-2W5v7/0/4?curriculum_id=4f89dab3d788890003000096


Code is a bit off...
Traceback (most recent call last):
File "python", line 7, in
NameError: name 'empty_string' is not defined


not sure how to define the empty string...


print 'Welcome to the Pig Latin Translator!'


original = raw_input("Enter a word:")


if len(empty_string) > 0:
    print "Greater."
    
else:
    print "empty"


#2

Instead of empty_string just put in original in the parentheses, you are checking if original's input is empty. :slight_smile:


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.