I cannot seem to edit my code in order for it to print consonant blends at the beginning of a word, to the end. Ex: I want a word like gloves to print ovesglay instead it print lovesgay.
Below is my code and I'm not sure what to put in consonant_blends = word[?] Or in its' corresponding elif statement, or what o can do to make it work.
VOWELS = ('a', 'e', 'i', 'o', 'u')
lst = ['sh', 'gl', 'ch', 'ph', 'tr', 'br', 'fr', 'bl', 'gr', 'st', 'cl' 'pl', 'fl', 'th']
first_letter = word
consonant_blend = word[?]
if first_letter in VOWELS:
##return word + "yay"
elif consonant_blend in lst:
##return word[?] + "ay"
##return word[1:] + word + "ay"
list_of_words = sentence.split(' ')
new_sentence = ""
for word in in list_of_words:
##new_sentence = new_sentence + convert_word(word)
##new_sentence = new_sentence + " "
print "Type in a sentence, and it'll get converted to Pig-Latin!"
print "Please don't use punctuation or numbers"
print "Also, we can't handle uppercase/lowercase yet, so lowers only please!"
text = raw_input()
I know it won't work now but before when Id try it would print this if my input was my gloves are warm
yay lovesgay areyay armway
I'd like it to print: yay ovesglay areyay arm way
How do I do this, and I understand I don't have every single consonant blend in my lst but just for the common words.