31
Cjkjvfnby
10 30 43
5274/ 5695
Andrey Solomatin
Last seen 1 year ago
Member for 11 years, 2 months, 9 days
Difficulty Normal
Best reviews / Newest reviews
Second-ultrajack 1 1
no: **p = list(map(lambda x:None, METALS))** yes: **p = [None] * len(METALS)** no: **if p[idx] == None:** yes: **if p[idx] is None:** no: **[frac,]** yes: **[frac]** you can replace: **sary = list(map(sum, zip(sary,div)))** with more readable list comprehansion **sary = [sum(x) for x in zip More
^-veky 1 2
Congratulation you have fastest solution here (1 from 8) More
First-Fermax 1 1
no: **str.count(text ,'1')** yes: **text.count('1')** More
First-pop_saitou 1 1
Put statment after **if** on new line, add spaces around binary operators. More
First-sekine360 1
Line 18 looks strange. Why you choose 10000? Why not 42? And better to put it inside solve function. In you case you should use q.pop() instead of q.pop(0). You can find explanation [here](http://stackoverflow.com/questions/195625/what-is-the-time-complexity-of-popping-elements-from-list-in-pyt More
First-kzfm 1
PEP8: For sequences, (strings, lists, tuples), use the fact that empty sequences are false. Yes: if not seq: if seq: You should use slice notation. More
First-funningboy 1
Very complex: zip([game_result[i][0] for i in range(3)], [game_result[i][1] for i in range(3)], [game_result[i][2] for i in range(3)]) same as: [tuple(x) for x in game_result] zip([game_result[0][0]], [game_result[1][1]], [game_result[2][2]]) same as: [(game_result[0][0], game_result[1 More
First-ka9e 1 1
you can use **range** function More
Second-RRRQ 1
to check if list (tuple, string) not empty use: if array: More
First-subaru 1 1
Not need to check both isdigit and isalpha, they are opposite. You can specify more exact condition. **c >= 3** It is not possible to have c more then 3. Who need s break if you can return. no: **return True if c >=3 else False** yes: **return c == 3** More
First-Gennady 1
This looks bad: **line = [0 for i in range(0,num)]** you can use: **line = [0] * num** You can use **copy.copy(line)** or **list(line)** or **line[:]** in line 39. No need to deepcopy. More
First-aomoriringo 1
You can rename function argument to wheat and ommit line 2. More
First-Gennady 1
It is possible implementation of that how sorted handle key argument. More
First-cesarkawakami 1
You can put all 3 cycles to product: for i, j (dj, di) in itertools.product(xrange(N), xrange(N), DIRS): It is bad practice then program raise exeptions during normal flow. You can replace **raise** with **continue** More
double loop-dirk86 1 1
no: **word == other\_word[-len(word):]** yes: **other\_word.endswith(word)** More
First-bukebuer 1 1
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-ryosms 1
if you repeat something a lot of times, then you doing it wrong. You need to use some kind of iteration. More
First-ajmssc 1
For **units** and **half** you can use strings not list. Please follow common code style for python. [PEP8](http://www.python.org/dev/peps/pep-0008/#other-recommendations) More
First-thuvh 1
no need to cut '0b' # return bin(number)[2:].count('1') More
Sometimes Python is not enough-HonzaKral 1
Then python has not enough braces :) More
1 2 3 4
5
6 7 8 9 10 11 12 13 14 15