Skip to content

Instantly share code, notes, and snippets.

@mlbright
Created August 13, 2009 19:01
Show Gist options
  • Save mlbright/167389 to your computer and use it in GitHub Desktop.
Save mlbright/167389 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# primes up to 10000
# Steve Krenzel's code
r,e,a = range,enumerate,all
for i,x in e(i for i in r(4,10**4) if a(i%j!=0 for j in r(3,i))):
print x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment