user avatar
user avatar
user avatar
Graipher
  • Member for 7 years
  • Last seen this week
Stats
320
reputation
7k
reached
6
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

Badges
This user doesn’t have any gold badges yet.
3
silver badges
9
bronze badges
18
Score
3
Posts
50
Posts %
14
Score
1
Posts
17
Posts %
14
Score
1
Posts
17
Posts %
3
Score
1
Posts
17
Posts %
3
Score
1
Posts
17
Posts %
2
Score
2
Posts
33
Posts %