Exercise is 12 of 15 - Purify
List Index out of Range-Error
" Oops, try again.
Your code looks a bit off--it threw a "list index out of range" error. Check the Hint if you need help!"
What I expected to happen was the following (Template-Question): lesson done and get to the next one
def purify(numbers): numbers_even =  for i in numbers: if (i % 2) == 0: numbers_even.append(numbers[i-1]) print(numbers_even) return numbers_even numbers = [1, 2, 3, 4, 5, 6, 7] purify(numbers)
The Code works, i.e., in Geany (a simple Python-IDE) as even as on shell; new list contains the correct Items (2,4,6)
Maybe you got a tip for me? What do I do wrong or better: how does codecademy (propz to you by this way for your great works! ) want me to solve the lesson?