8
Kuznetsov_Mihail
3 13
287/ 345
Last seen 3 years ago
Member for 5 years, 6 months, 12 days
Difficulty Normal
Liked a comment created by Phil15 for forum post "Not everything work. 10 times I changed approach)"
    lambda x: (-x[1], x[0])
else it's two separated by a comma.

Like I say below (we wrote message 
Liked a comment created by Phil15 for forum post "Not everything work. 10 times I changed approach)"
First, if you use counter, you can use the method `most_common`.

Second, your code don't consider t
Thank you guys. Good lesson for me. I read a lot. There is final view import re from collections i
Liked a comment created by Phil15 for forum post "Not everything work. 10 times I changed approach)"
`most_common(1)` just keep the first, it's not what you need in each case so just `most_common()`.

Liked a comment created by Merzix for forum post "Not everything work. 10 times I changed approach)"
    >>> Counter('abracadabra').most_common(3)
    [('a', 5), ('r', 2), ('b', 2)]

The `lambda x: -x[