What is wrong with this function? Haaalpp


#1



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


Traceback (most recent call last):
File "python", line 6, in
TypeError: object of type 'builtin_function_or_method' has no len()


I want this to allow a user to enter their word, check to see if they entered more than one character, if they do, print their word, if 0, print empty
Thanks


raw_input("Enter a Word:")
original = raw_input
if len(original) > 0:
        print original
else:
        print "empty"


#2

Should be...

original = raw_input("Enter a Word:")

#3

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