Help with pprint
Nadav Chernin
Nadav.C at qualisystems.com
Wed Nov 25 07:47:16 EST 2009
Hello, I want to print list of lists in matrix format. So I use pprint
with parameter 'width' for this target.
For example :
>>> data=[[1, 1, 1], [1, 1, 1], [1, 1, 1]]
>>> pprint(data,width=20)
[[1, 1, 1],
[1, 1, 1],
[1, 1, 1]]
The problem that I don't know how to select width value, because if:
>>>data=[['one', 'one', 'one'], ['one', 'one', 'one'], ['one', 'one',
'one']]
>>> pprint(data,width=20)
[['one',
'one',
'one'],
['one',
'one',
'one'],
['one',
'one',
'one']]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091125/92532303/attachment.html>
More information about the Python-list
mailing list