Purify does not recognize numbers


Hello, My purify code is like this

 def purify(num):
     p_num = []
     for i in [num]:
         if i % 2 == 0:
     return p_num
 print purify([1,2,3])

All is well untell I run it and get this error
that says an int and list can not go together in this line
if i % 2 == 0:
Help would be appreciated if you know how to get my code to recognize numbers.


It's not a number. It's a list. You might want to iterate through num instead of assigning num to i


Thank you for your help