[anti_vowel]what's wrong with my code


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>
I don’t khow why it always reminds me that i can’t remove the ‘o’ in the word ‘words’.and the error message is :
Oops, try again. Your function fails on anti_vowel(“Hey look Words!”). It returns “None” when it should return “Hy lk Wrds!”.
I have tried many times and whatever the last word is ,like ‘look’ or any other ,it has the problem.
<What do you expect to happen instead?>
i don’t know the specific reason what happened ,but it seems the function remove() make trouble,what should i do? :worried:

```python def anti_vowel(text):
list_text=list(text)
for item in list_text:
    if item in 'aeiouAEIOU':    
        list_text.remove(item)
print ''.join(list_text)

anti_vowel(‘hey look words!’)

<do not remove the three backticks above>

#2

so first you have to replace print with return
second you have to clone your first list and remove vowel from the second list not the first

def anti_vowel(text):
    list_text=list(text)
    lista=list_text[:]
    for item in list_text:
        if item in 'aeiouAEIOU':    
            lista.remove(item)
    return ''.join(lista)
anti_vowel('hey look words!')

#3

well, it works.Thank you! :blush: