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 5 years
24 profile views
Last seen Feb 9 at 8:50
- Code Review 39.9k 39.9k 77 gold badges6060 silver badges124124 bronze badges
- Stack Overflow 6.2k 6.2k 2525 silver badges4343 bronze badges
- Ask Ubuntu 956 956 99 silver badges1414 bronze badges
- Physics 630 630 55 silver badges1010 bronze badges
- Science Fiction & Fantasy 411 411 33 silver badges1010 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
- 27 Powerful GUI Calculator for Linux?
- 25 Comma Code (project from "Automate the Boring Stuff with Python")
- 22 What is the name of this plot that has rows with two connected dots?
- 22 Large Number Limit Extravaganza
- View more network posts →