right-format of integer output as text

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Thu Mar 15 14:51:57 EDT 2007


In <1173984339.188538.200880 at l75g2000hse.googlegroups.com>, dmitrey wrote:

> how can I implement this one in the simpliest way?
> Thank you in advance,

In [45]: '%10d' % 1
Out[45]: '         1'

In [46]: '%10d' % 42
Out[46]: '        42'

In [47]: '%10d' % 10000
Out[47]: '     10000'

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list