I know you can just do something like this:
def anti_vowel(text): vowel = 'euioaEUIOA' rev ='' for letter in text: if letter not in vowel: rev += letter return rev
I tried to do it differently and it does not do what I want it to do.
I expect it work and remove all vowels.
def anti_vowel(text): vowel = 'euioaEUIOA' for letter in text: if letter in vowel: text.replace(letter,'') return text