Daily Python 2 – Functionizing even number separation

In this excersise you should write a function that accepts a list of numbers, and returns only the the even numbers of that list in a new list.

input: [1,3,4,5,8]

output: [4,8]

make sure to test it with multiple lists and numbers!

Tip: Use return and the modulo operator (%)!

def even_numbers(num_list):

Leave a Reply

Your email address will not be published.