Skip to content

Instantly share code, notes, and snippets.

@sreevidyavutukuru
Created July 8, 2017 18:54
Show Gist options
  • Save sreevidyavutukuru/3659d18a04aedbb90f9f7e0bfd1499e1 to your computer and use it in GitHub Desktop.
Save sreevidyavutukuru/3659d18a04aedbb90f9f7e0bfd1499e1 to your computer and use it in GitHub Desktop.
sqr = math.sqrt(10000)
print sqr
list1= []
i = 1
while i <=10000:
list1.append(i)
i += 1
x=2
for x in list1:
if x > sqr:
break
for val in list1:
if val%x == 0 and val!= x:
list1.remove(val)
print list1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment