Please find the error


def anti_vowel(text):
    for n in text:
        if n in "aeiouAEIUO":
        return no_vowels


break breaks the loop, so the moment a vowel is found, the loop breaks, that can't be right

a function ends the moment a return keyword is reached, the function ends. So, your function ends in the first iteration/run of the loop, but to get the anti vowel string the whole loop needs to run so place return outside the loop


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.