Anti-vowel


#1



Can someone tell me the difference between the two codes.

Working code:

def anti_vowel(text):
    string = ''
    for i in text:
        if i not in "aeiouAEIOU":
            string += i
    return string


Error code: 

def anti_vowel(text):
    string = ''
    vowels = "aeiouAEIOU":
    for i in text:
        if i not in vowels:
            string += i
    return string


#2

I have noticed, there is a typo on the second code

line 3 : vowels = "aeiouAEIOU":
the colon is not supposed to be there