'pretty print' for built in types
clp at rebertia.com
Tue Dec 9 16:57:39 CET 2008
On Tue, Dec 9, 2008 at 7:31 AM, Robert Dailey <rcdailey at gmail.com> wrote:
> Is there a built in way to 'pretty print' a dict, list, and tuple
> (Amongst other types)? Dicts probably print the ugliest of them all,
> and it would be nice to see a way to print them in a readable way. I
> can come up with my own function to do this, but I don't want to do
> this if I don't have to.
There's the `pprint` module in the std lib:
Follow the path of the Iguana...
More information about the Python-list