Skip to content

Instantly share code, notes, and snippets.

View pig-latin.py
#input is string of word
word=input('enter word = ')
l=['a','e', 'i', 'o' ,'u']
i=0
while i< len(word):
if word[i] in l:
#print(i)
pig_latin_word=word[i:]+word[:i]+'ay'
print(pig_latin_word)