I have been stuck at this exercise for some time trying to figure out why I am continuing to get an error message. According to the instructions, it should be able to loop through a list of numbers and, if any are odd numbers, filter them out to preserve only a list of even numbers.
Instead, I am getting this error: "Oops, try again. Your code looks a bit off--it threw a "" error. Check the Hint if you need help!"
Any help is appreciated. I am new to this, so not quite sure how to interpret some of the more complicated explanations that I see when I have tried to search against this error...
My code is:
def purify(numbers): newnum =  while numbers > 0: for i in numbers: if i % 2 != 0: return False else: newnum.append(i) return newnum