How can I force pprint() to print one list/tuple/dict element per line?
>>> from pprint import pprint
>>> my_var = ['one', 'two', ('red','green'), {'state' : 'Oregon', 'city' : 'Portland'}]
>>> pprint(my_var)
['one', 'two', ('red', 'green'), {'city': 'Portland', 'state': 'Oregon'}]
I would like the output to be something like:
['one',
'two',
('red',
'green'),
{'city': 'Portland',
'state': 'Oregon'}]
pprint
ing{u'a': {u'b': {u'c': {u'd': {u'foo': 1, u'bar': 2}}}}}
. – Miniature