>>> d = {'four': {'six': 6, 'five': 5}, 'three': [3, 33, 333], 'two': 2, 'one': 1}
Print out to console only first level of dictionary like this:
>>> {'four': {...}, 'one': 1, 'three': [...], 'two': 2}
print(d)
from pprint import pprint
pprint(d, depth=1)
from pprint import pprint
pprint(d)
0 explanations
Explanations are useful to guide through learning process and confirm that the correct answer is indeed correct.
Only registered users can add explanations