8. Anti Vowel (practice makes perfect)


#1

here's my code but i keep getting an error


#2

It says what you returned, and what the result should be. They are slightly different, they should be exactly the same.

Copy them and put them each on their own lines if you can't spot it.


#3

You are initializing anti with one white space at the beginning.

You must changed line 2 using anti="" insted anti=" "


#4

ah got it thanks a lot :slightly_smiling:


#5

def anti_vowel(text):
anti = ""
vowels = ['a','e','i','o','u','A','E','I','O','U']
for char in text:
if char not in vowels:
anti = anti + char
return anti

print anti_vowel('Welcome')