Ending Up


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:len(new_word)] 
    print new_word
    print 'empty'


whats wrong with my code please help


Can you explain what this line does?
This is the line where you making mistake.


With this you need to add ' = new_word ' because python doesn't know what word to slice if you dont put it before the slice command.


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