Anti vowel - this didn't work for me


#1

This code from the archive worked for others but not for me. What's wrong with it?

def anti_vowel(text):
txt = ""
for c in text:
if c not in "aeiouAEIOU":
txt += c
return txt


#2

The code you posted works:

def anti_vowel(text):
    txt = ""
    for c in text:
        if c not in "aeiouAEIOU":
            txt += c
    return txt

Use proper indentation in your posts, please, it makes troubleshooting a lot easier!