pyg = 'ay' original = raw_input('Enter a word:') if len(original) > 0 and original.isalpha(): print original word=original.lower() print word first=word print first new_word= word+first+pyg new_word=[1:len(new_word)] print new_word else: print 'empty'
new_word=[1:len(new_word)] is incorrect. What you are trying to do is set new_word equal to an index, but python doesn't know what it's an index of. Make sure to include the string or variable that you are accessing through the index as well as the index.
Check this line again. Is that how you access index?
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.