I am stuck on the Practice Makes Perfect code which is supposed to return a list of even numbers, The exercise is called Purify
The Error I get is
Oops, try again. Your function fails on purify(). It returns [2, 4, 2, 4, 6, 8] when it should return .
It does return the right numbers so I am not sure what is wrong with it.
new_numlist =  num_list = [1,2,3,4] def purify(num_list): count = 0 list_len = len(num_list) for numbs in range(0,list_len): even = num_list[numbs]%2 if even == 0: new_numlist.append(num_list[numbs]) num_list = new_numlist return num_list result = purify(num_list) print result