8/15 anti_vowel


#1



Hi, just wondering why this code does not work. It says theres a "" error which i'm not even quite sure what that is.
Thank you!


def anti_vowel(text):
     vowel = "aeiouAEIOU"
     newtext = list(text)
     for character in newtext:
         if character not in vowel:
             newtext.append(character)


#2

i would create a new empty list to append characters to, appending characters to newtext will give original string + consonants

then after the loop, return the anti vowel string


#4

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