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
First-cbrunet 1
V and S are bad variable names for python. For multi line docstrings I prefer to start text from second line. 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-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-artemrudenko 1
**int(x if x != '0' else '1')** **int(x) if x != '0' else 1** 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
'su' + 'm'-papernode
If you use variable once and in return statment, just return result return eval('su' + 'm')(data) More
First-ParadisiacMercy
str = '' -> shadow builtin function if Num < 1 or Num > 3999: This check is not required. It makes code more bulky. (Num, modNum) = divmod(Num, 10) -> Num, modNum = divmod(Num, 10) numToRomanNum and checkio are two functions that do same job. It is bad design. read about PEP8 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-ryosms
line 3: http://www.checkio.org/forum/post/1618/proper-way-to-check-if-sequence-is-empty/ 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-gyahun_dash 1
**pr = reduce(...** => **return reduce(...** you can replace you lambda with **mul** from operator module More
First-subaru
no need to convert to list: **for l in list(s)** just use **for 1 in list(s)** More
Second-jcg 1
You copy-paste same issue from you other solution. 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
Using +-veky 1
It can be done shorter, just remove + More
Fizz Buzz Killed-creative_genius
You can skip parenthesis: if number % 5 == 0 and number % 3 == 0: More
First-lolo_bv
line 14: http://www.checkio.org/forum/post/1618/proper-way-to-check-if-sequence-is-empty/ More
First-RRRQ 1
no: **if len( args ) == 0** yes: **if not args** no: **argslist = list( args ); argslist.sort()** yes: **argslist = sorted(args)** Why you need abs? More
First-turtle51
You can use return on length fail. if len(data) < 10: return False Check all function return all((length, num, caps, low)) Please cleanup you code before publish, this comments are invalid. # replace this for solution # Some hints # Just check a More
First-ciel 1
lambda is not suitable in that case. More
1 2 3 4 5 6
7
8 9 10 11 12 13 14 15