Skip to main content
Graipher's user avatar
Graipher's user avatar
Graipher's user avatar
Graipher
  • Member for 8 years, 9 months
  • Last seen this week
Stats
581
reputation
41k
reached
4
answers
0
questions
Loading…
About
def prime_sieve(limit):
    prime = [True] * limit
    prime[0] = prime[1] = False

    for i, is_prime in enumerate(prime):
        if is_prime:
            yield i
            for n in range(i * i, limit, i):
                prime[n] = False

http://codereview.stackexchange.com/a/150447/98493

This user doesn’t have any gold badges yet.
2
silver badges
7
bronze badges
24
Score
1
Posts
25
Posts %
24
Score
1
Posts
25
Posts %
24
Score
1
Posts
25
Posts %
19
Score
2
Posts
50
Posts %
5
Score
1
Posts
25
Posts %
5
Score
1
Posts
25
Posts %
Top posts