34,516
reputation
3
10

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

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

5
answers
0
questions
~2k
people reached
  • Zürich, Switzerland
  • Member for 3 years, 11 months
  • 18 profile views
  • Last seen Jan 15 at 10:46

Top tags (6)

Score 42
Posts 5
Posts % 100
Score 11
Posts 1
Score 11
Posts 1
Score 10
Posts 1
Score 10
Posts 1
Score 3
Posts 1

Top posts (5) All Questions Answers | Votes Newest

Badges (13)

Gold

Silver

3

Rarest

Bronze

10

Rarest