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 4 years, 10 months
0 profile views
Last seen Jul 1 '20 at 10:14
- Code Review 40.1k 40.1k 77 gold badges6161 silver badges125125 bronze badges
- Stack Overflow 6.2k 6.2k 2626 silver badges4343 bronze badges
- Ask Ubuntu 966 966 99 silver badges1414 bronze badges
- Physics 640 640 55 silver badges1010 bronze badges
- Science Fiction & Fantasy 411 411 44 silver badges1111 bronze badges
- View network profile
Top network posts
- 57 Why is a `for` loop so much faster to count True values?
- 53 String reversal in Python
- 49 Send a tweet to ISP when internet speed drops
- 28 Powerful GUI Calculator for Linux?
- 25 Comma Code (project from "Automate the Boring Stuff with Python")
- 23 What is the name of this plot that has rows with two connected dots?
- 22 Count Even Digits In Number
- View more network posts →