Graipher
  • GitHub
  • Köln, Deutschland
  • Member for 5 years, 7 months
Stats
40,206
reputation
2k
reached
5
answers
1
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.
5
silver badges
12
bronze badges

Top tags (7)

Score 40
Posts 6
Posts % 100
Score 10
Posts 1
Score 10
Posts 1
Score 9
Posts 1
Score 9
Posts 1
Score 3
Posts 1

Top posts (6)