8/15 anti_vowel


#1

Hello,

I got problem with anti_vowel exercise. Everything seems correct and codeacademy module seems to show that code is working good but underneath the code it shows that function returns “None” even though it returns what it needs to return.

Here is the code:

def anti_vowel(text):
  a = []
  for i  in text:
    if i != "a" and i != "e" and i != "i" and i != "o" and i != "u":
  		a.append(i)
  print "".join(a)
    
anti_vowel("Umbrella")

Screenshot aswell:

Thank you!


#2

None is the default returned value, your function only prints the anti-vowel string, it doesn’t return it


#3

Thanks, Works fine. Needed to change print to return and add uppercase letters aswell.


#4

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