32
vvm70
9 29 51
5944/ 6195
Vladimir
Last seen 1 day ago
Member for 4 years, 1 month, 9 days
Difficulty Normal
Best reviews / Newest reviews
native_is_even-Jon_Red 3
It would be more readable to separate signs: num % 2 == 0 More
7-liner: Sorted By Copy And Clear-Stensen 2 1
One line of code is superfluous. You should change variable names :) def sort_by_removing(values: list) -> list: copy = [] for n in values: if not copy: copy.append(n) elif n >= copy[-1]: copy.append(n) return copy More
native_acceptable_password_i-Jon_Red 2
It is enough to write return len(p) > 6 because it returns boolean. More
First-jusha 2
The condition is redundant because a slice doesn't raise an IndexError. E.g.: print([][2:]) # output: [] More
First-jusha 2
ternary operator is superfluous because (not 0) == True More
First-jusha 2
The code in lines 3 and 5 can be deleted by replacing line 7 with if not i.isspace() and i != '': More
First-juestr 2
**iter** for Army is great. And **next** makes the code simpler. More
LISt Processing-veky 2 1
The code worthy to figure out! More
all-the-same.first-poa 1 1
it would be too long to iterate through all the list if it contained hundreds of equal elements. slicing would be faster :) More
native_popular_words-Jon_Red 1 1
It is not good to shorten parameter names :) More
not the smartest one(-Vasily__Chibilyaev 1 1
Very good! c[-1::-1] is the same as c[::-1]. More
non-empty-lines.First-poa 1 1
There is such a method for splitting lines: text.splitlines() More
First-jusha 1
It is enough one colon: items[items.index(border):] More
same-jusha 1 1
It is superfluous: if len(elements) <2: return True because len(set(elements))<=1 returns True for empty list More
First-poa 1 1
maybe it would be better use 'elif' clause so as not to go through all the directions More
First-hetareguma 1 1
You should write this function with one 'return' :) More
native_the_warriors-Jon_Red 1
Your function fight() is better than mine, but your style :( More
Words Order-vvm70 1
It could be shorter: list({word: 0 for word in text.split() if word in words}) == words More
First-jusha 1
It can be written without list conversion, because a set is an iterator: lst = sorted(words_set, key = lambda i:len(i)) And the first condition is unnecessary. More
First-jusha 1
It would be more readable to separate symbols: a = a + '_' len(a) % 2 More
1
2 3 4 5 6 7 8