def toEnglish(s):
    sentence = s.split(' ')
english = ''
for word in sentence:
    if word[:len(word) - 4:-1] == 'yaw':
        english += word[:len(word) - 3] + ' '
else:
    index = -3
for letter in reversed(word[:-3]):
    if letter is not 'a':
        index -= 1
else:
    break
english += word[index:-2] + word[:index - 1] + ' '
return english
Перевод Pig Latin на английский с помощью Python 3