Builtin_function_or_method' has no len()


#1

I am supposed to determine the length of the raw_input in this section, but I am having trouble with the len() function.

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

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

#2

raw_input() is the built-in function. We need to assign the return value to a variable.

original = raw_input("Enter a word")

#5

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