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
27,575
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

2
answers
0
questions
~162
people reached
  • Zürich, Switzerland
  • Member for 3 years, 1 month
  • 8 profile views
  • Last seen 2 days ago

Top Tags (3)

Score 18
Posts 2
Score 11
Posts 1
Score 11
Posts 1

Top Posts (2) All Questions Answers | Votes Newest

Badges (11)

Gold

Silver

3

Rarest

Bronze

8

Rarest