12. Purify


Oops, try again. Your code looks a bit off--it threw a "'str' object has no attribute 'append'" error. Check the Hint if you need help!

Can someone help me?

def purify(numbers):
    for i in numbers:
        if i%2==0:
    return new


you declared new as a string:


this should be a list. append() is a function which appends item to a list


Your new variable needs to be a list:
new = []


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