print with variable justification (with *)

Why Tea ytlim1 at gmail.com
Sat Nov 18 16:44:27 EST 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