12/15 ERROR: Oops, try again. Your function crashed on [1] as input because your function throws a "'int' object is not iterable" error


#1

def purify(numbers):
even_numbers = []

for i in numbers:
    if ( i%2 == 0 ):
        even_numbers.append(i)
    else:
        return 0
print even_numbers

#2

Your function should return a list but you return 0 which is not a list.


#3

def purify(num):
even=[]
for i in num:
if i%2==0:
even.append(i)
return even