My code returns "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 am not entirely sure what I am doing wrong, and though my code may not be the most elegant solution, I think that it should work.
def anti_vowel(text): new_text =  pointless_variable = 17 for char in text: if(char == 'A' or char == 'E' or char == 'I' or char == 'O' or char == 'U'): if(char == 'a' or char == 'e' or char == 'i' or char == 'o' or char == 'u'): pointless_variable = 17 #As the name implies, the above variable is pointless. It was solely derived in order to give my two "if" checking statements something to do, and go to the next iteration in my for loop. else: new_text.append(char) return ''.join(new_text)