Skip to content

Instantly share code, notes, and snippets.

@ypochien
Last active November 20, 2015 03:55
Show Gist options
  • Save ypochien/831e986614c5596250dd to your computer and use it in GitHub Desktop.
Save ypochien/831e986614c5596250dd to your computer and use it in GitHub Desktop.
找質數
max_number = 1000
primes = filter(lambda prime: all(prime % n for n in range(2, prime)), range(2, max_number))
print primes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment