Skip to content

Instantly share code, notes, and snippets.

@T1T4N
Created December 14, 2022 12:26
Show Gist options
  • Save T1T4N/5d6382fc029d107a5c67a4ece3b7a9bc to your computer and use it in GitHub Desktop.
Save T1T4N/5d6382fc029d107a5c67a4ece3b7a9bc to your computer and use it in GitHub Desktop.
Python one liner - first 10 primes
print(list(filter(lambda x: all(x%d for d in range (2,x)), range(2, 3**10)))[:10])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment