Lesson 15.8: Anti_vowel
I wrote this solution for the problem, with the goal being deleting all vowels from strings.
def anti_vowel(text): for i in text: if i in "aeiouAEIOU": text = text.replace(i,"") return text
The above text has been fixed and should work now.
However, the lesson is giving me the error:
"Your function fails on anti_vowel("Hey look Words!"). It returns "Hey lk Wrds!" when it should return "Hy lk Wrds!"."
Why would this function delete all the vowels in the test string except for the first "e"? And what can I do to fix it?