Skip to content

Instantly share code, notes, and snippets.

@yankees714
Created February 4, 2013 15:06
Show Gist options
  • Select an option

  • Save yankees714/4707287 to your computer and use it in GitHub Desktop.

Select an option

Save yankees714/4707287 to your computer and use it in GitHub Desktop.
n = 1000
ints = range(2,n+1)
factor=0
while(factor<len(ints)):
for i in range(len(ints)-1,factor, -1):
if ints[i]%ints[factor]==0:
ints.pop(i)
index=index+1
print ints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment