Anti_vowel


#1



https://www.codecademy.com/courses/python-intermediate-en-rCQKw/1/2?curriculum_id=4f89dab3d788890003000096#


I can't really figure out what's going wrong here :confused:

I keep getting this error message: Does your anti_vowel function take exactly one argument (a string)? Your code threw a "'builtin_function_or_method' object has no attribute 'getitem'" error.

What am I doing wrong? Help??


Thank you very much for any help!


def anti_vowel(text):
    vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']
    word =[]
    for char in text:
        word.append[char]
    for item in word:
        if item in vowels:
            word.remove[item]
    wrd = "".join(word)
    return wrd


#2

.remove() is a method, it requires parentheses. (square brackets is for access by index (list and string) or key (dictionary))

.remove() is a difficult approach to solve this problem


#3

I was messing up the brackets everywhere but I figured it out now :slight_smile: thank you very much


#4