8. anti_vowel help!


I'm getting the error:
Your function fails on anti_vowel("Hey look Words!"). It returns "" when it should return "Hy lk Wrds!".

I understand that my else statement is returning the initial value of 'I', but I'm frustrated and don't know what to use instead. I remember having a similar problem in the past but that was solve by using a 'for-else' instead of an 'if-else', but that doen't work here. It's killing me.

def anti_vowel(text):
    for i in text:
        if i in "aeiouAEIOU":
            return '' 
            return i,

Preformatted text


return is not something you want to be doing inside a loop that is accumulating a result. We need the loop to run its full course.


So I need to store the result of 'i' each time, like in a list??


A list would work well. It can be joined in the return statement.