TypeError: 'unicode' object is not callable


#1



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


Traceback (most recent call last):
File "python", line 7, in
TypeError: 'unicode' object is not callable


Trying to make my code pull the first letter of the variable word which is the .lowercase of original


pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
    word = original.lower()
    first = word(0)
    print original
else:
    print 'empty'


#2

Did you mean to write, word[0]?


#3

Yeah. I'm an idiot.

I read that line 50 times and never realized I'd used (). Thank you.


#4

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