[Tutor] print question
Alan Gauld
alan.gauld at btinternet.com
Tue Oct 9 16:17:32 CEST 2007
"Kent Johnson" <kent37 at tds.net> wrote in message
news:470B59F8.8010506 at tds.net...
> Dick Moores wrote:
>> return "%02d:%02d:%5.2f" % (hours, minutes, seconds)
>
> Try %05.2f
>
> The leading 0 is a 'conversion flag' that specifies zero-padding.
Sorry I should have included that in my post but I assumed it was
"obvious" since thats what you did with the %d fields...
Never assume: it makes an ass out of u and me... :-)
Alan G
More information about the Tutor
mailing list