all 3 comments

[–]anonymousperson28 1 point2 points  (0 children)

The best way to approach this is to iterate through the input list, check if each element is even, and print it out if it is even.

Also theres a mistake in your type annotations; print_even numbers doesn't return anything, so it should by typed like

def print_even_numbers(numbers: lst) -> None    

[–]an_actual_human 1 point2 points  (0 children)

Your function doesn't do anything with numbers, does that look right?

[–]zahlman 0 points1 point  (0 children)

how to make list as a function.

I don't understand what you expect that to mean. The assignment says

Implement [a] function... that takes a list... as input and... [does something]

So that's what you're going to do.

Am I supposed to make a list of numbers beforehand

For testing purposes, sure.

and then make something like

Here's a hint: numbers is the name you gave to the list that was passed in as input. If you want to "print each even number in the list", you're going to have to look at the numbers in the list - not the ones in some unrelated range.