Lecture 2, function arguments

Hi there, I could not understand this function. Could you explain it in a simple way pls? Thank you

def filter_even(number_list):
result_list = []
for number in number_list:
if number % 2 == 0:
result_list.append(number)
return result_list

even_list = filter_even([1, 2, 3, 4, 5, 6, 7])

def filter_even(number_list):
    result_list = []
    for number in number_list:
        if number % 2 == 0:
        result_list.append(number)
return result_list

So this is a function to return all even numbers in a list. All it’s doing is that for every value in the list, it checks whether or not it’s divisible by two.
This % is the Modulus operator that returns the remainder of the division. number % 2 will return 0 if a number is completely divisible by 2.
If the condition is satisfied, it will append the current value to our resultant list.

Thank you very much!