Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pprint dic without sorting

import pprint

data = {'not': 'sorted', 'awesome': 'dict', 'z': 3, 'y': 2, 'x': 1}
pprint.pprint(data, sort_dicts=False)
# prints {'not': 'sorted', 'awesome': 'dict', 'z': 3, 'y': 2, 'x': 1}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pprint #dic #sorting
ADD COMMENT
Topic
Name
2+2 =