Vowel Removal errors


#1

https://www.codecademy.com/courses/python-intermediate-en-rCQKw/1/2?curriculum_id=4f89dab3d788890003000096#
I am getting a syntax error at the else: on line 6 and am not sure what I should be doing

def anti_vowel(text):
    text = str(text)
    a = []
    for x in text:
        if x == "a" or x == "A" or x == "e" or x == "E" or x == "i" or x == "I" or x == "o" or x == "O" or x == "u" or x == "U":
            else: 
                a.append(x)
        b = ""
    for i in a:
        b = b + i
    return b

#3

your else is wrongly indented:

if x == "a" or x == "A" or x == "e" or x == "E" or x == "i" or x == "I" or x == "o" or x == "O" or x == "u" or x == "U":
            else: 
                a.append(x)

should be:

if x == "a" or x == "A" or x == "e" or x == "E" or x == "i" or x == "I" or x == "o" or x == "O" or x == "u" or x == "U":
else: 
    a.append(x)

which brings us to the second problem (it does make sense if and else should be at the same indent level?), if needs to do something. Thankfully, python has the keyword pass, which means: do nothing. Which is what you want to do in your case. Hope this helps