Getting this error in python


#1

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
print original
word = original.lower()
first = word[0]
new_word = word + first + pyg
new_word[1:]
else:
print 'empty'

when i enter hello it's tell me this ;
Oops, try again. It looks like new_word contains "hellohay" instead of "ellohay"!
Any help by the way?


#3

You need to use new_word = new_word[1:len(original)]. this assigns the shortened version to the memory where new_word is stored