8/15 anti_vowel



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":
  print "".join(a)

Screenshot aswell:

Thank you!


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


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


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