Skip to content

Instantly share code, notes, and snippets.

@codeboy101
Created January 10, 2016 04:27
Show Gist options
  • Select an option

  • Save codeboy101/1b1a3f8c248e055a640f to your computer and use it in GitHub Desktop.

Select an option

Save codeboy101/1b1a3f8c248e055a640f to your computer and use it in GitHub Desktop.
consonants = ['b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z']
vowels = ['a','e','i','o','u']
newLetters = '{consonant}o{consonant}' ## string formatting
while True :
wordPut = input("enter word : ")
if wordPut == "-1" :
break
else :
myList = [letter if letter in vowels else newLetters.format(consonant = letter) for letter in wordPut]
print(''.join(myList))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment