Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Check out <a href="http://docs.python.org/library/pprint.html" rel="nofollow noreferrer">Python pprint</a>. </p> <blockquote> <p>The pprint module provides a capability to “pretty-print” arbitrary Python data structures in a form which can be used as input to the interpreter.</p> <p>[...]</p> <p>This example demonstrates several uses of the pprint() function and its parameters.</p> </blockquote> <pre><code>&gt;&gt;&gt; import pprint &gt;&gt;&gt; tup = ('spam', ('eggs', ('lumberjack', ('knights', ('ni', ('dead', ... ('parrot', ('fresh fruit',)))))))) &gt;&gt;&gt; stuff = ['a' * 10, tup, ['a' * 30, 'b' * 30], ['c' * 20, 'd' * 20]] &gt;&gt;&gt; pprint.pprint(stuff) ['aaaaaaaaaa', ('spam', ('eggs', ('lumberjack', ('knights', ('ni', ('dead', ('parrot', ('fresh fruit',)))))))), ['aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'], ['cccccccccccccccccccc', 'dddddddddddddddddddd']] &gt;&gt;&gt; pprint.pprint(stuff, depth=3) ['aaaaaaaaaa', ('spam', ('eggs', (...))), ['aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'], ['cccccccccccccccccccc', 'dddddddddddddddddddd']] &gt;&gt;&gt; pprint.pprint(stuff, width=60) ['aaaaaaaaaa', ('spam', ('eggs', ('lumberjack', ('knights', ('ni', ('dead', ('parrot', ('fresh fruit',)))))))), ['aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'], ['cccccccccccccccccccc', 'dddddddddddddddddddd']] </code></pre> <p>Otherwise figure out what the longest number is in terms of character length and use Python's <a href="http://docs.python.org/library/string.html#format-string-syntax" rel="nofollow noreferrer">string substitution formatting options</a> to make everything of the same length. Or use tabs as the separating characters. Lots of options!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload