Oops, try again. Your function fails on anti_vowel("Hey look Words!"). It returns "Hey look Words!" when it should return "Hy lk Wrds!".
I would expect it to work, I can't find out what's the mistake. Could you guys please help me out?
Thanks in advance!
def anti_vowel(text): vowels = "aeiouAEIOU" res = "" for t in text: for v in vowels: if t == v: res = res+"" break else: res = res+t break return res