Skip to content

Instantly share code, notes, and snippets.

@CrBoy
Created June 23, 2012 08:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CrBoy/2977594 to your computer and use it in GitHub Desktop.
Save CrBoy/2977594 to your computer and use it in GitHub Desktop.
Generate prime numbers example
num = range(100)
result = set(num)
for i in range(2,10):
result -= set(num[i*2::i])
result -= set([0,1])
print result
@johnroyer
Copy link

Awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment