My code is not working properly


My code should remove all vowels out of the string passed in. Instead it removes all of the vowels exceot for the vowels in the "Words". I don't have any any errors but I am not gettting the desired outcome

Replace this line with your code. 
def anti_vowel(text):
    x = list('aeiouAEIOU')
    list_txt = list(text)
    print list_txt
    for i in list_txt:
        if i in x:
    return ''.join(list_txt)
print anti_vowel('Hey look words')


The above can have a negative impact on the iteration of the list. .remove() is not necessarily the best tool for this job unless we start iterating from the right hand side. That I'll leave for you to research.

String are iterables, so we need not convert the inputs to a list. Just use the string.

    result = []
    for x in text:
        if x in 'aeiouAEIOU":
    return "".join(result)