<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Marc 'BlackJack' Rintsch wrote:
<blockquote cite="mid:67lrc1F2o7iv7U3@mid.uni-berlin.de" type="cite">
  <pre wrap="">On Mon, 28 Apr 2008 04:37:02 -0700, rajesh kataraki wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">     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.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
In [22]: '%03d' % 5
Out[22]: '005'

Ciao,
        Marc 'BlackJack' Rintsch
--
<a class="moz-txt-link-freetext" href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list</a>

  </pre>
</blockquote>
    that or use <b>str(5).zfill(3)</b><br>
</body>
</html>