Created
June 23, 2012 08:48
-
-
Save CrBoy/2977594 to your computer and use it in GitHub Desktop.
Generate prime numbers example
This file contains 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
num = range(100) | |
result = set(num) | |
for i in range(2,10): | |
result -= set(num[i*2::i]) | |
result -= set([0,1]) | |
print result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome