Hello I'm having issues with this problem:
I'm getting this error when I run my program:
Oops, try again. Your function fails on anti_vowel("Hey look Words!"). It returns "Hey lk Wrds!" when it should return "Hy lk Wrds!".
If I am reading through my code correctly, it should move through "original" and if my index, "i", is a vowel is should replace it with nothing, thereby removing it.
My code seems to skip the first "e" when the phrase "Hey Look Words!" is used. When I use my code with other words or phrases it doesn't do this. For example if I just put in "eee" it correctly returns nothing, but if I put in "eEe" it will return E, conversely if I input "EeE" the code returns e.
Why is my code doing this? (code is below)
def anti_vowel(original): for i in original: if i in "aeiouAEIOU": new=original.replace(i, "") return new