Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sort dictionary by key python

for key in sorted(a_dictionary):
        print ("{}: {}".format(key, a_dictionary[key]))
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #sort #dictionary #key #python
ADD COMMENT
Topic
Name
8+1 =