Purify


#1




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


Do i need to put an int() in somewhere, ive tried it everywhere i can think but it doesnt seem to solve the problem.


def purify(lst):
    new_lst = []
    for n in lst:
        if (n % 2) == 0:
            new_lst = new_lst.append(n)
    return new_lst


#2

append() will update the list, you don't need to store this result in a variable


#3

That has fixed the problem, thank you so much!


#4