Need help on left padding

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Mon Apr 28 07:39:45 EDT 2008


On Mon, 28 Apr 2008 04:37:02 -0700, rajesh kataraki wrote:

>      My requirement is I am using one variable ex. var = 5 which is
> integer.
>     And this variable, I m using in some string. But I want this var
> to be used as 005 again integer in this string.

In [22]: '%03d' % 5
Out[22]: '005'

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list