15/12 Purify


Why it didnt working?
It returns :
Oops, try again. Your code looks a bit off--it threw a "'NoneType' object has no attribute 'insert'" error. Check the Hint if you need help!

def purify(lista):
    a_list = []
    for i in lista:
        if i%2 == 0:
            a_list = a_list.insert(lista.index(i),i)
    return a_list


list.insert has no return value, so you won't want to assign the result of calling that to anything.