def prime_sieve(limit): prime = [True] * limit prime = prime = False for i, is_prime in enumerate(prime): if is_prime: yield i for n in range(i * i, limit, i): prime[n] = False
Member for 3 years, 11 months
18 profile views
Last seen Jan 15 at 10:46
- Code Review 34.5k 34.5k 66 gold badges5252 silver badges112112 bronze badges
- Stack Overflow 5.6k 5.6k 2121 silver badges3737 bronze badges
- Ask Ubuntu 896 896 77 silver badges1313 bronze badges
- Physics 620 620 44 silver badges1010 bronze badges
- Cross Validated 321 321 11 silver badge55 bronze badges
- View network profile →
Top network posts
- 55 Why is a `for` loop so much faster to count True values?
- 53 String reversal in Python
- 47 Send a tweet to ISP when internet speed drops
- 25 Comma Code (project from "Automate the Boring Stuff with Python")
- 22 Powerful GUI Calculator for Linux?
- 22 What is the name of this plot that has rows with two connected dots?
- 22 Making a deck of cards in Python
- View more network posts →
Top tags (6)
10 2019: a year in moderation Jan 3
8 Should I ask architectural questions on CodeReview? Apr 13 '19
3 Mat's back, blame the monkey Nov 6 '19