user avatar
user avatar
user avatar
Graipher
  • Member for 11 years, 3 months
  • Last seen more than 1 year ago
Stats
996
reputation
245
reached
0
answers
1
question
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.
4
silver badges
5
bronze badges
Top tags
0
Score
1
Posts
100
Posts %
0
Score
1
Posts
100
Posts %
0
Score
1
Posts
100
Posts %