Error: Your function fails on anti_vowel("Hey look Words!"). It returns "None" when it should return "Hy lk Wrds!".

It printed the correct phrase but why does it print "None"?

def anti_vowel(text):
    vowel = ['a', 'e', 'i', 'o', 'u']    
    result = []    
    for i in list(text):
        if i.lower() not in vowel:
    print "".join(result)


you need to return the string without vowels.

then, add print + function to print the string


Thanks I found out I just needed to change "print" into "return"


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