Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
24,780
reputation
2
7

Graipher

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 xrange(i * i, limit, i):
                prime[n] = False

http://codereview.stackexchange.com/a/150447/98493

1
answer
0
questions
~133
people reached
  • Zürich, Switzerland
  • Member for 3 years
  • 7 profile views
  • Last seen yesterday

Top Tags (3)

Score 11
Posts 1
Score 11
Posts 1
Score 11
Posts 1

Top Posts (1) All Questions Answers | Votes Newest

Badges (9)

Gold

Silver

2

Rarest

Bronze

7

Rarest