project-euler-100

[RADIOACTIVE] solutions to the first 100 challenges of project euler
git clone git://git.figbert.com/project-euler-100.git
Log | Files | Refs | README

commit 2a555e12351d9d7e5b0445146bf57779a7126ea9
parent 4dd16e0520aacd3125f3b1d5a8b40684bee72ab1
Author: therealFIGBERT <figbertwelner@gmail.com>
Date:   Sat, 25 Jan 2020 13:46:50 -0800

Simplify list selection in the solution to problem 7

Diffstat:
Mproblem007.py | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/problem007.py b/problem007.py @@ -12,8 +12,7 @@ def sieveOfEratosthenes(limit): for i in range(p * 2, limit+ 1, p): prime[i] = False p += 1 - prime[0]= False - prime[1]= False + prime[0:2] = [False, False] return [p for p in range(limit + 1) if prime[p]] def search():