Can someone explain to me why this code doesnt work? But when i add
but when i add
if x is not in letters:
word += x
It chooses to work? Whats the main difference here.
def anti_vowel(text): letters = "aeiouAEIOU" word = "" for x in text: if (x != letters): word += x return x