So the error message goes like
my function fails on anti_vowel("Hey look Words!"). It returns "Hey lk Wrds!" when it should return "Hy lk Wrds!".
The thing is, I tried with several strings, and when I put in
hey, the function would return
hy, but if I put in
hey look, it would return
It seems that if the string has only one vowel, the vowel would be deleted, but if it has two or more, the first one won't be got rid of, and other vowels would disappear.
Anybody got any idea?
def anti_vowel(text): for i in text: if i in "aeiouAEIOU": new_text = text.replace(i, "") return new_text