22
narimiran
7 24 41
2882/ 2945
Last seen 5 years ago
Member for 8 years, 4 months
Difficulty Normal
Would like to receive comments/critics of my published solutions.

Best reviews / Newest reviews
Digit Stack-noahwp
Don’t use variable names which are python’s keywords (sum). More
First-saharnasiri71
If you slightly correct your line 6: return max(args) - min(args) there's no need for lines 2 and 3 ;) More
First-wizzie 1
You might want to know about [zip](https://docs.python.org/3/library/functions.html#zip). Check other solutions for its usage here. More
First-Abiks
Check string method .isalpha(), it might have helped you a lot there. More
First-quartermaine 1
You don't have to have 'else' after 'if'. Lines 10-11 are not needed. More
First-AnupamSharma
Lines 5-8 could be simpler: if matrix[i][j] != -matrix[j][i]: return False More
First-ClementBC
Line 5, just check it like this: if queue: Line 8: queue.append(s[-1]) Lines 9-12: return ''.join(queue) More
First-xDiDx
Thumb up for creative workaround for string.replace() method :) More
First-iv22 1
You could have avoided removing the last comma if you chose new array to be a list, not a string. Also, having temp_array is not needed. So you can remove lines 10, 12, 13, 19 and now your lines 14 and 21 would look like this: 14: new_array.append(str(n) + str(n+1)) ..... 21: return ' More
First-oleg.shmelev
If you would like to avoid deleting that last ',' - a better idea would be to store each phrase in a list, and then return a string of all phrases in a list, separated by ',': word = [] for phrase in phrases: word.append(phrase.replace("right", "left")) return ','.join(word) More
First-gg10161011
Line 10 could be written as: string += "," + item.replace("right","left") But you could have avoided all that trouble of checking if 'string' is empty or not, if you decided to make 'string' a list: string = [] for item in phrases: string.append(item.replace("right", "left")) More
First-Gruia
','.join(phrases) is already a string, no need to convert it - you can remove that 'str' at the beginning of the line. More
First-saharnasiri71
If you used 'enumerate' in your line 3: for i, word in enumerate(words_list): your lines 4, 6 and 7 would have looked much nicer. For example, line 7: words_list[i+2].isalpha(): More
First-nlimpid
Line 5 - Python way of checking if something is empty: if not li: But, instead of checking if something is in your list, you could have directly checked if there's something in args, and if there is, find max and min of args - so you don't need your first three lines where you create 'li': More
First-deamon32
Pythonic way of checking if something is empty: (line 2) if not args: Also, there exist 'min' and 'max' functions, which give you min and max value, no need to sort and pick first and last item: return max(args) - min(args) More
First-AdrianMZ
There exist 'min' and 'max' functions, which give you min and max value, no need to sort and pick first and last item: return max(tabela) - min(tabela) Having that said - there's no need to create tabela - in line 6 you could check 'if not args' and then in line 9 just return difference betwee More
First-xDiDx
There exist ‘min’ and ‘max’ functions, which give you min and max value, no need to reinvent them (plus, it’s a bad practice to call your variables the same as built-in functions) More
First-olsonj
There exist 'min' and 'max' functions, which give you min and max value, no need to sort and pick first and last item: return max(args) - min(args) More
First-oleg.shmelev
There exist ‘min’ and ‘max’ functions, which give you min and max value, no need to reinvent them (plus, it’s a bad practice to call your variables the same as built-in functions) More
First-amartyaamp
Lines 6 and 7 - you don't have to type all that: from string import ascii_lowercase alpha = list(ascii_lowercase) More
1 2 3 4
5
6 7 8 9 10