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, 8 months
13 profile views
Last seen Oct 14 at 15:28
- Code Review 31.4k 31.4k 66 gold badges4949 silver badges108108 bronze badges
- Stack Overflow 5.2k 5.2k 2121 silver badges3737 bronze badges
- Ask Ubuntu 876 876 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 →