Have a variable column length in printf

Cameron Pulsford cameron.pulsford at gmail.com
Sun May 31 07:58:15 CEST 2009


Hello all, I'm trying to pretty print a list, so I am doing something like
print '%3d' % integer

only I would like that 3 to be a variable, instead of hardcoded. Is this
possible, or are there any other ways to accomplish this? Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090531/36ab24ac/attachment.html>


More information about the Python-list mailing list