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,060
reputation
5
44
99
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

569
answers
8
questions
~714k
people reached
  • Zürich, Switzerland
  • Member for 3 years, 2 months
  • 1,719 profile views
  • Last seen 43 mins ago

Top tags (230)

Score 2,293
Posts 571
Posts % 99
Score 903
Posts 215
Score 475
Posts 102
Score 313
Posts 75
Score 309
Posts 79
Score 152
Posts 22

Top posts (577) All Questions Answers | Votes Newest

View all questions and answers

Badges (148)

Gold

5

Rarest

Silver

44

Rarest

Bronze

99

Rarest