33
Kurush Kurushich
Last seen 6 days ago
Member for 11 years, 2 months, 12 days
Difficulty Normal
My solution is almost the same. I used "return max(data, key = data.get)" inside function.
More
Very subtle approach! Nice job!
More
I have used the same idea as you. Another approach to make a one-liner is to use slices: return val[::-1]
More
I used the same one-liner but inside the function.
More
Good approach. But it can be significantly reduced to " return len(set(elements)) <= 1" or " return len(set(elements)) < 2".
More