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