Graipher
  • GitHub
  • Köln, Deutschland
  • Member for 3 years, 6 months
Stats
331
reputation
14k
reached
2
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.
1
silver badge
7
bronze badges
Top tags
13
Score
1
Posts
50
Posts %
13
Score
1
Posts
50
Posts %
13
Score
1
Posts
50
Posts %
13
Score
1
Posts
50
Posts %
13
Score
1
Posts
50
Posts %
10
Score
1
Posts
50
Posts %