Purify


#1

https://www.codecademy.com/courses/python-intermediate-en-rCQKw/2/2?curriculum_id=4f89dab3d788890003000096#

error:Oops, try again. Your function crashed on [1] as input because your function throws a "list.remove(x): x not in list" error.Please help :cry:


#2

Please post your code


#3

I solved the problem but still, thanks :wink:


#4

def purify(numbers):
sequence = []
for f in sequence:
if f%2 -1: //filters out non even(odd),alternative to if f%2 == 0:
sequence.append(f) //populates the sequence list with even numbers
return sequence //returns list with even numbers.