def eras(n):
a = set(range(2,n+1))
l = round(n**0.5)
for i in range(2,int(l+1)):
if i in a:
s = i**2
while s <= n:
if s in a:
a.remove(s)
s += i
return list(a)
I.... wish this would indent correctly.
a = set(range(2,n+1))
l = round(n**0.5)
for i in range(2,int(l+1)):
if i in a:
s = i**2
while s <= n:
if s in a:
a.remove(s)
s += i
return list(a)
I.... wish this would indent correctly.