Purify


#1


Hi I found the below error messages , what's meaning? please advice me..


Oops, try again. Does your purify function take exactly one argument (a list of numbers)? Your code threw a "'builtin_function_or_method' object has no attribute 'getitem'" error.


def purify(numbers):
    d = []
    for c in numbers:
        if c % 2 == 0:
            d.append[c]
    return d     

purify([1,2,3])


#2

use () instead of []
on "d.append[c]


#3

I thought it's big problem after see error messages.
Thanks..


#4

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