Graipher
  • Member for 3 years, 3 months
  • Last seen more than a month ago
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.
This user doesn’t have any silver badges yet.
3
bronze badges
Posts

This user hasn’t posted yet.