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, 8 months
0 profile views
Last seen Jan 15 '18 at 16:12
- Code Review 36.8k 36.8k 66 gold badges5656 silver badges117117 bronze badges
- Stack Overflow 5.7k 5.7k 2121 silver badges3939 bronze badges
- Ask Ubuntu 906 906 77 silver badges1313 bronze badges
- Physics 620 620 55 silver badges1010 bronze badges
- Earth Science 331 331 11 silver badge66 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
- 48 Send a tweet to ISP when internet speed drops
- 25 Comma Code (project from "Automate the Boring Stuff with Python")
- 23 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 →