Check Yourself... len() error


#1



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


So, I'm trying to get through this lesson and I keep getting the error message: Traceback (most recent call last):
File "python", line 6, in
TypeError: object of type 'builtin_function_or_method' has no len()

I have looked up and copied other's coding of the same lesson and it still gives me this message, can anyone tell me what I'm doing wrong?


raw_input("your word")
original = raw_input
if len(original) > 0:
    print original
else:
    print 'empty'


#2

raw_input("your word")
original = raw_input

you should have one raw_input() that stores the value to original.

remember you need a () for raw_input .It asks the users for a input .


#5

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