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 2 years, 5 months
0 profile views
Last seen Jul 13 '18 at 13:21
- Code Review 32.7k 32.7k 66 gold badges5151 silver badges110110 bronze badges
- Stack Overflow 5.5k 5.5k 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
- 53 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 Count Even Digits In Number
- View more network posts →
Keeping a low profile.
This user hasn't posted yet.