Error..error..error!


#1

def purify(numbers):
numbers = list(numbers)
for i in numbers:
if i % 2 == 0:
print i
return i
WHAT IS THE PROBLEM IN THE GIVEN CODE
ERROR MESSAGE:::Your function crashed on [1] as input because your function throws a "'int' object is not iterable" error.

THANKX IN ADVANCE


#2

you are not removing the element from the list but just printing and returning it.
read the exercise again


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.