Search
 
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
Name
4+6 =