[plug] [OT] Adding leading zeros in python

James Devenish devenish at guild.uwa.edu.au
Tue Dec 21 18:10:46 WST 2004


In message <20041221085535.GD25656 at patrick.wattle.id.au>
on Tue, Dec 21, 2004 at 04:55:35PM +0800, Cameron Patrick wrote:
> Try 'file%.2d' (note the decimal point).

Hmmm, I think 'file%02d' would be better practice to teach. And it
can be combined with floating-point precision if you want it (e.g.
'file%05.2f').





More information about the plug mailing list