16
Last seen 3 years ago
Member for 3 years, 6 months, 9 days
Difficulty Normal
Not bad. My solution is similar, but I sort lists, not reverse them, which
is less effective. But why do you create new list instead of len(items) - 1?
More
Good solution, but why do you form a new list, when you can return just a slice?
More
It's too long and redundant. You can sort list in ascending order and then
sort it by frequency in descending order. Or use tuple in key argument of
sorted function.
More
Nice solution. Last line could be shorter "return not open_brackets"
More
I think you don't need this condition s[s.find(s[i])] == s[i], because it's
always True.
More
I have the same solution, but I don't create any variables. join() method returns a string, so you don't need to convert string to string.
More
Good solution, but I think it's better to create list of ints(x), not
tuples(x, y). And name it something like pos or pos_zero.
More