Only the Even Ones
I have a list of 3 numbers here with me that's already in the code editor, but I want you to add some more to this list by inputting some more numbers yourself in one line and then, print out only the even numbers from the list.
Can you do that for me?
Input:
33 54 32 11 8
Output:
2
54
32
8
string =list(input().split(" "))
size = len(string)
for i in string:
if (int(i) % 2==0):
print(i)
Comments
Leave a comment