DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
collections counter sort by value
>>> Counter('abracadabra').most_common(3) [('a', 5), ('r', 2), ('b', 2)]
Source by pythonworld.ru #
PREVIOUS
NEXT
Tagged:
#collections
#counter
#sort
ADD COMMENT
Topic
COMMENT
Name
1+6 =
Submit