Python Forum

Full Version: Pig Latin Translator
You're currently viewing a stripped down version of our content. View the full version with proper formatting.


def translate(text):
    return ' '.join('{}{}{}'.format(word, word[0], 'say')[1:] for word in text.split())

while 1:
    word = input('Enter some words: ')
    if word == 'quit':
        break
    print(translate(word))
python 2.7 will need raw_input how can I make this run on 2.7 and 3?
what is your question? you resurrected a year-old thread...