Why is this loop not looping more than once?(ANTI_VOWEL problem)


#1



If the input for anit_vowel is "discoaaa" the code return "disco".That is it is looping only once ,Why?


def anti_vowel(txt):
 g="aeiouAEIOU"    
 for f in g:
        for c  in txt:
            if f==c:
                txt=txt.replace(f,"")
                return txt
                
print(anti_vowel("discoaa"))


#2

a function ends the moment a return keyword is reached, this currently happens once the first vowel is found


#3

I am feeling so happy! I just figured that while I playing with the code.Thanks a lot to you .


#4