From aee3afe90cbf7985d9a79c90a025d96c05f337e9 Mon Sep 17 00:00:00 2001 From: lesves Date: Mon, 4 Nov 2019 17:09:30 +0100 Subject: [PATCH] Create vic_bigdick_sito.py --- 4/vic_bigdick_sito.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 4/vic_bigdick_sito.py diff --git a/4/vic_bigdick_sito.py b/4/vic_bigdick_sito.py new file mode 100644 index 0000000..0c2f9a6 --- /dev/null +++ b/4/vic_bigdick_sito.py @@ -0,0 +1,8 @@ +# Sire Kubisi, tady jsem vas dobehl +# Tohle sito je lepsi, kratsi a rychlejsi +# (Meril jsem to pomoci timeit) + +from functools import reduce + +def primes(n): + return reduce(lambda l, x: [y for y in l if y==x or y%x!=0], range(2, n), range(2, n))