elena1234

Filter in Python

Feb 1st, 2022 (edited)
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. text = input().split(' ')
  2. sequence2 = list(map(int, text))
  3.  
  4. result = filter(lambda x: x % 2 == 0, sequence2)
  5. print(list(result))
  6.  
Add Comment
Please, Sign In to add comment