> I created a function to print the Time object:
>
> def printTime(time):
>       print "%d:%d:%d" % (time.hours, time.minutes,
> time.seconds)
>
> However, when I type '00', I get the following:
>>>> time = Time(12,34.4,00)
>>>> printTime(time)
> 12:34:0

Hi Chris,

You'll want to check some of the details on "String Formatting" -- there's 
an option to format a number using two (or more) digits:

     http://www.python.org/doc/lib/typesseq-strings.html

Good luck!
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to