I'm close, but not close enough


Hey guys and/or gals,
I'm stuck on the anti_vowel exercise. I have an idea of what I need to do, but I just can't quite put the answer together. I'm sure you guys can help me out.
Here is my code -

def anti_vowel(text):
result = []
s = ""
for let in text:
if let not in "aeiouAEIOU":
return result

this is the error message I get...
" Oops, try again.
Your function fails on anti_vowel("Hey look Words!"). It returns
"['H', 'y', ' ', 'l', 'k', ' ', 'W', 'r', 'd', 's', '!']" when it should
return "Hy lk Wrds!". "

I understand why I am getting this error message, and I even understand that I need to use the join function, I just can't pull out the correct answer. Any advice and explanation would be greatly appreciated,



You need to adjust it so result is equal to joining a string with the list.


or include the join statement in the return line.


Ah I see. I change my return line to...
return "".join(result)
...and it fixed it.
Thanks guys! Forward on I trudge


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