[Tutor] print question

Kent Johnson kent37 at tds.net
Tue Oct 9 12:37:44 CEST 2007


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.

Kent


More information about the Tutor mailing list