Help? What did I do wrong/am I missing?


#1

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 = word[1:len(new_word)]
print original
else:
print 'empty'


#2

here:

new_word = word[1:len(new_word)]

you take a slice of word, you should take a slice of new_word (you want to get rid of the first character of new_word)


#3

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