Printing complex data structures becomes better when you use pprint.
https://hamatti.org/posts/improved-print-readability-with-pprint/
Printing complex data structures becomes better when you use pprint.
https://hamatti.org/posts/improved-print-readability-with-pprint/
@hamatti
Tip: it's probably better to prefer pprint.pp() over pprint.pprint() because pprint() sorts dictionaries by default, which can be surprising now that dictionaries maintain insertion order.
pprint.pp() was added in Python 3.8 so is available for all supported versions.
https://docs.python.org/3/library/pprint.html#pprint.pp