Beautiful output in python?

Hi all. Is there a python way to beautiful conclusion say dictionary or list? Same php it
echo "<pre>";
print_r();
echo "</pre>";
July 2nd 19 at 18:08
2 answers
July 2nd 19 at 18:10
Solution
>>> import pprint
>>> 
>>> lst = [1, 2, 3, 4, 5, {'a': 'b', 'c': 'd', 'e': 'f'}]
>>> 
>>> pprint.pprint(lst, width=5)
[1,
2,
3,
4,
5,
 {'a': 'b',
 'c': 'd',
 'e': 'f'}]
>>>
July 2nd 19 at 18:12
pprint

Find more questions by tags Python