getting this msg: Oops, try again. Your function fails on anti_vowel("Hey look Words!"). It returns "Hy lk Words!" when it should return "Hy lk Wrds!".

at every point, one vowel is left behind

def anti_vowel(text):
    for letter in text:
    for item in x:
        if item in 'aeiouAEIOU':
    return "".join(x)


list can't have empty indexes, so the moment you remove something everything to the right of the removed item shifts one index to the left (filling the gap) then the loop moves on to next index, causing the succesive vowel to be skipped


Okay thanks! I am unable to fix it though. What should I be changing?


i usually advise not to use .remove(), because its quit difficult

The opposite approach (appending constonants to a new list) is much easier

If you really want to use .remove(), the "easiest" thing to do is to loop over text while removing from x

because you are not removing from the same list as you are looping over, you don't have a problem with index shifts


Great thanks! Got it