My first attempt...
returns "None" along with the following error message:
"Oops, try again. Your function crashed on  as input because your function throws a "'NoneType' object is not iterable" error."
my second attempt works just fine...
I'm not exactly clear on what the ".append()" process is doing. My understanding is that this command will edit the current list and add whatever is in the (). I'm not sure why I cannot simply tell the program to return the appended list, and instead I have to append the list first and then return it. Can someone explain to me what python is actually doing when the .append() method is called?
see code below.
1. def purify(x): evens =  for i in x: if i % 2 == 0: return evens.append(i) 2. def purify(x): evens =  for i in x: if i % 2 == 0: evens.append(i) return evens