Skip to content
Snippets Groups Projects
Commit 5f5961bc authored by Taddeus Kroes's avatar Taddeus Kroes
Browse files

Small improvement to primes_until()

parent df4f5041
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ def primes_until(n):
if not lst[i]:
yield i
for j in xrange(i, n, i):
for j in xrange(i + i, n, i):
lst[j] = True
i += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment