Ending Up


How do I fix this???


It looks like new_word contains "underwooduay" instead of "nderwooduay"!

Replace this line with your code. 
pyg = 'ay'

original = raw_input('Enter a word:')

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



new_word  [1:len(new_word)]

you take a slice of new_word, which you should store in new_word (in essence, updating the variable)


This doesn't clear it up, at least for me.

This part is the slice:

new_word [1:len(new_word)]

So as a hint, you still need to set the variable new_word equal to this statement.


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