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
28,506
reputation
3
8

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

3
answers
0
questions
~367
people reached
  • Zürich, Switzerland
  • Member for 3 years, 3 months
  • 10 profile views
  • Last seen 5 hours ago

Top tags (3)

Score 28
Posts 3
Score 11
Posts 1
Score 11
Posts 1

Top posts (3) All Questions Answers | Votes Newest

Badges (11)

Gold

Silver

3

Rarest

Bronze

8

Rarest