Sep-25-2017, 06:12 PM
You are looping over list1, which is 'john', 'tony', and 'luck'. None of those are in vowels, so your if statement never triggers.
You need two loops. First loop over the words in mlist, which effectively what you are doing now. Then loop over the characters in vowels. Then replace that character with a hypen (-, not an underscore _) in the word. You will need to build a list of the modified words and return that after both loops are finished.
You need two loops. First loop over the words in mlist, which effectively what you are doing now. Then loop over the characters in vowels. Then replace that character with a hypen (-, not an underscore _) in the word. You will need to build a list of the modified words and return that after both loops are finished.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures