Solve problem "Even elements" online - Learn Python 3 - Snakify

Even elements


Statement

Given a list of numbers, find and print all elements that are an even number. In this case use a for-loop that iterates over the list, and not over its indices! That is, don't use range()

In all the problems input the data using input() and print the result using print().

# Read an integer:
# a = int(input())
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Input:
1 2 2 3 3 3 4
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Saved solutions

Tests

InputCorrect answer
1 2 2 3 3 3 4
2 2 4
1 2 3 4 5
2 4
2 4 6 8
2 4 6 8
1 1 1 1 1 1 2
2
44 -51 32 -60 -7 -67 62 91 26 -14
44 32 -60 62 26 -14
32 -95 -78 -15 -71 -73 -83 53 -91 -82 -71 -52 -60 -18 12 8 98 -92 -83 7
32 -78 -82 -52 -60 -18 12 8 98 -92
39 55 -88 56 -39 -92 -30 54 15 94 27 -87 -85 -53 -44 -87 33 38 -22 56
-88 56 -92 -30 54 94 -44 38 -22 56