pyassistant

Extract Even Numbers

Write a function that takes a list of integers and returns a new list containing only the even numbers from the original list, in the same order.

Example:

Input:
[1, 2, 3, 4, 5, 6, 7, 8, 9]
Output:
[2, 4, 6, 8]

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.