Is there a Python module that can be used in the same way as Perl\'s Data::Dumper module?
Edit: Sorry, I should have been clearer. I was mainly afte
I think the closest you will find is the pprint module.
>>> l = [1, 2, 3, 4] >>> l.append(l) >>> d = {1: l, 2: 'this is a string'} >>> print d {1: [1, 2, 3, 4, [...]], 2: 'this is a string'} >>> pprint.pprint(d) {1: [1, 2, 3, 4, ], 2: 'this is a string'}