print with variable justification (with *)

Why Tea ytlim1 at gmail.com
Sat Nov 18 22:44:27 CET 2006


> In [50]: '%*s' % (5, 'spam')
> Out[50]: ' spam'
> 

Marc, that's exactly what I need. Thanks!

/Why Tea




More information about the Python-list mailing list