TypeError: 'unicode' object is not callable



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
    print 'empty'


Did you mean to write, word[0]?


Yeah. I'm an idiot.

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


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