I completed the PygLatin translator just fine, but for some reason the code cuts off the last letter of my pyg variable.
I expect the entire length of my pyg variable to print, including the last letter.
pyg = 'ayy' original = raw_input('Enter a word: ') if len(original) > 0 and original.isalpha(): print original word = original.lower() first = word new_word = word + first + pyg #New word is original, then first letter, then pyg suffix 'ay' s = new_word new_word = s[1:len(new_word)] #Print from 1 to slice first letter from new word print s[1:len(new_word)] else: print 'Please enter a single word to translate'
will return for an input of Humanity “umanityhay” which is correct but will only happen when I add the extra y to the pyg variable. Why is that?