PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#input is a string of integers divided by a space
numLst = list(map(lambda i: int(i), input().split()))
for i in numLst:
if i % 2 != 0:
numLst.remove(i)
numLstStr = list(map(lambda i: str(i), numLst))
space = " "
print(space.join(numLstStr))
#this code doesnt work properly.
#the code below does
'''
inpLst = list(map(lambda i: int(i), input().split()))
numLst = list(filter(lambda i: i%2==0, inpLst))
numLstStr = list(map(lambda i: str(i),numLst))
space = " "
print(space.join(numLstStr))
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run