31
Cjkjvfnby
10 30 43
5274/ 5695
Andrey Solomatin
Last seen 1 year ago
Member for 11 years, 2 months, 8 days
Difficulty Normal
Best reviews / Newest reviews
Fizz Buzz Killed-creative_genius
You can skip parenthesis: if number % 5 == 0 and number % 3 == 0: More
First-bukebuer 1
**map(int, [n for n in str(number) if n!='0'])** is very bad. You can do it in one pass, just convert to int inside list comprehension. n0 is bad name for variable. I prefer to use **res** or **result** in such cases. More
Second-jcg 1
You copy-paste same issue from you other solution. More
First-subaru
no need to convert to list: **for l in list(s)** just use **for 1 in list(s)** More
First-gyahun_dash 1
**pr = reduce(...** => **return reduce(...** you can replace you lambda with **mul** from operator module More
First-LMAO 1
you can simplify expression: **if product == 0:** => **if product** you can simplify you code by set product to 1 at line 2. More
First-ryosms
line 3: http://www.checkio.org/forum/post/1618/proper-way-to-check-if-sequence-is-empty/ More
Straightforward-nickie
You can omit last argument of reduce. Pydocs: If the optional initializer is present, it is placed before the items of the iterable in the calculation. More
First-artemrudenko 1
**int(x if x != '0' else '1')** **int(x) if x != '0' else 1** More
First-bukebuer
you can use builtin function **len** instead of this lambda: **lambda x: len(x)** see **str.endswith** in python docs you can throw away lines 2 and 3, because **for i in []** will do no cycles. More
First-jcg 1
In line 4-5 you made some checks, but same checks will be done in line 7(inside endswith). I did not test it but think that removing lines 4-5 will make you code to work faster. More
First-wahyuoi
You should not use \_\_special\_\_ methods. Use == instead \_\_eq\_\_ More
LMAO-LMAO
you can use builtin function **len** instead of you lambda: **lambda x: len(x)** removing check at line 2-3 will not affect result. More
First-Gennady 1
Why you put this to "Speedy" category? More
First-kogi
Why you put this to "Speedy" category? More
Second-kogi
Why you put this to "Speedy" category? More
First-RemyHerve
You can replace **frozenset(second.split(','))** with **second.split(',')** it will speedup you code. More
First-ciel 1
Theres is function in standard library that do the same as **lambda e: abs(e)** you should use it instead of this lambda. More
First-RRRQ
There is function in standard library that do the same as **lambda x: abs(x)** you should use it instead of this lambda. More
First-4everer
you can iterate over items in list: output=[numbers_dict[item] for item in numbers_list] More
1 2 3 4 5 6 7 8 9 10 11 12
13
14 15