Marc 'BlackJack' Rintsch wrote:
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
--
http://mail.python.org/mailman/listinfo/python-list

   that or use *str(5).zfill(3)*
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to