Formatting Utilities#

format_dict(d: dict) str#

Format dictionary with each key-value pair on a new line.

Parameters:
ddict

Dictionary to format

Returns:
str

Formatted string representation of dictionary

Examples

>>> d = {'a': 1, 'b': 2}
>>> print(format_dict(d))
'a': 1,
'b': 2,