Last active
November 20, 2015 03:55
-
-
Save ypochien/831e986614c5596250dd to your computer and use it in GitHub Desktop.
找質數
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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