Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

pig.py pig Latin translator



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))


This post first appeared on Ricky's Python Notes, please read the originial post: here

Share the post

pig.py pig Latin translator

×

Subscribe to Ricky's Python Notes

Get updates delivered right to your inbox!

Thank you for your subscription

×