I'm not sure that this is even remotely close to the problem solution but I am having issues with defining my variables. This isn't the first instance where I'm having problems. Can someone illuminate this for me?
Here is the code:
def purify(numbers): pure_list= if i in numbers %2 == 0: pure_list.append(i) return pure_list
This returns a NameError: Name "i" is not defined.
I thought that this is an arbitrary variable meant to act as a placeholder. Why does it need to be defined?