Stack Exchange Network

Stack Exchange network consists of 174 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
21,263 reputation
5
31
83

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

Top Tags (211)

Score 1,734
Posts 434
Posts % 99
Score 651
Posts 152
Score 389
Posts 77
Score 284
Posts 71
Score 161
Posts 50
Score 130
Posts 25

Top Posts (438) All Questions Answers | Votes Newest

View all questions and answers

Badges (119)

Gold 5

Rarest

Silver 31

Rarest

Bronze 83

Rarest