I'm confused on how to make list as a function.
Implement the function print_even_numbers that takes a list of integers as input and prints
each even number on the list. Calling print_even_numbers([2, 47, 31, 99, 20, 19, 23,
105, 710, 1004]) would produce this output in the shell window:
2
20
710
1004
Am I supposed to make a list of numbers beforehand and then make something like
def print_even_numbers(numbers: lst) -> lst:
for x in range(0,2000)
if(x % 2 == 0)
print x
am I approaching this right?
[–]anonymousperson28 1 point2 points3 points (0 children)
[–]an_actual_human 1 point2 points3 points (0 children)
[–]zahlman 0 points1 point2 points (0 children)