Skip to main content
Graipher's user avatar
Graipher's user avatar
Graipher's user avatar
Graipher
  • Member for 4 years, 2 months
  • Last seen more than a week ago
Stats
211
reputation
6k
reached
1
answer
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.
1
silver badge
4
bronze badges
Top tags
11
Score
1
Posts
100
Posts %
Top posts