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
Transpose-nickie 2 1
Code is not well formated, it is hard to read it. **enumerate** has start argument. you can use **itertools.zip_longest** instead of **zip** More
AngelRaposo-AngelRaposo 2
Some python tips: # if text[0] == ' ' if text.startswith(' ') #if text[len(text)-1] == ' ': you can access last item by text[-1] if text.endswith(' ') More
First-jcg 2 1
You can get alphabet : **from string import ascii_lowercase** No need to c.lower() it is already in lowercase by mission rules. More
Flood fill-nickie 2
I did not see any benefits of **deque** in this case. You can use **list** and pop last added item. More
First-bukebuer 2 1
You solution is potentialy wrong. In precondition: string.ascii_letters + **string.punctuation** Your **".,;:?!"** is not cover all punctuation You can simplify you code by using None as split separator (https://docs.python.org/2/library/stdtypes.html#str.split) You can zip message and scores. Or More
String Composition-Xanatos 2
PEP8: For sequences, (strings, lists, tuples), use the fact that empty sequences are false. Yes: if not seq: if seq: No: if len(seq) if not len(seq) More
First-jcg 2 1
Watch you spaces. See PEP8 for more info. More
First tell you problem-bulbetta 2 1
You should avoid to use magic numbers, for letter in range(26): if uppercase[letter] in data: checks[2] = True if lowercase[letter] in data: checks[3] = True you can use zip or xrange(len(iterable)) # xrange is almost same as range More
Break Down-Lingson 2
This is worst usage of nested function. You just create it to use once and it does not use any arguments from outer scope. More
Check-Rotate-Check-bryukh 2 1
Return **None, None** is good idea. **enumerate** has start argument. I don't sure that docstrings are useful at this case. Function and arguments has good names. Lines 5, 12, 29 has no dot at the end. You have two blank lines in function body (35,36). More
Set comprehension-veky 2 1
**{g(p//n+d*k,p%n+e*k)** I usualy produse such text by random typing instead of **lorem ipsum** :) More
iter-Sim0000 2 1
You can move common code from max and min to separate function. More
First-tihenko 2
Use of **global** is bad practice, it is easy to make checkio to have no side effects. You can start position from 0, in that case **p+1** will became **p** and **p+2 => p+1** Please follow PEP8 for better readability. More
First-CaMeLCa5e 2 1
> \# This one use () Tuple? Or unnercessary parenthesis? This comment is confusing. More
First-AlexeyIvchenko 2
Good code, easy to read and understand. You can join *near_cells*, *can_go* and *possible_moves*, to one function that will return list of possible cells. You use class and side effects instead of return, but still passes visited as argument. """ Style """ More
First-thuvh 1
no need to cut '0b' # return bin(number)[2:].count('1') More
First-Sim0000 1 1
while ' ' in text: text = text.replace(' ', ' ') You can just split by space and filter empty values. (You split it any way.) Better to use '\n'.join() instead of string concatenation. More
First-aomoriringo 1
You can rename function argument to wheat and ommit line 2. 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-rfonseca 1 1
**maximize_sum** almost do all you need in this task, just need to add two conditions **if len==1 return max(lst[0], 0) if not len return 0** More
1
2
3 4 5 6 7 8 9 10 11 12 13 14 15