Purify


#1



https://www.codecademy.com/courses/python-intermediate-en-rCQKw/2/2?curriculum_id=4f89dab3d788890003000096#

I'm just unsure about what is meant in the instructions by: Do not directly modify the list you are given as input; instead, return a new list with only the even numbers.


Replace this line with your code.


#2

What they want you to do is only look at the list you get.
Then make another list where you only put the even numbers in that were inside the list you got.

So instead of looking to remove uneven numbers, they want you to make a function that looks for even numbers.


#3

Create a new list called result or whatever you call it, and append results in it.

def purify(numbers):
result = []
for x in numbers:
if x % 2 == 0:
result.append(x)
return result
print(purify((6, 8, 12, 3, 7, 9)))

it returns a list with [6, 8, 12]