Advertisement
STANAANDREY

lsd4 7

Oct 21st, 2022
788
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. lst = [int(item) for item in input("Enter the list items : ").split()]
  2. primes = filter(lambda x: x > 1 and all(x % d for d in range(2, int(x**.5) + 1)), lst)
  3. print(list(primes))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement