Dynamic Zero Padding.

harrismh777 harrismh777 at charter.net
Tue Jun 7 17:55:49 EDT 2011


Friedrich Clausen wrote:
> I would be much obliged if someone can give me some tips on how to
> achieve a variably pad a number.


>>>> b='04'
>>>> a="testing %"+b+"i"
>>>> print(a % 1)
> testing 0001




kind regards,
m harris




More information about the Python-list mailing list