DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
sort dictionary by value and then key python
sorted(y.items(), key=lambda x: (x[1],x[0]))
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#sort
#dictionary
#key
#python
ADD COMMENT
Topic
COMMENT
Name
2+8 =
Submit