Need helpwith Pyg Latin Lesson in Python


Hi Guys, I’m stuck at PygLatin Lesson. Pls, help.

I have written this code but it’s giving the result ‘pythonpay’ instead of ‘ythonpay’

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 new_word
  print 'empty'



new_word [1:len(new_word)]

you take a slice of new_word, but what do you with the result of this slicing? At the moment, nothing


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