On Thu, Jan 10, 2013 at 1:31 PM, pmec <pcura...@gmail.com> wrote: > Hi Oscar, again I do apologize for my beginner mistakes, I've changed the > code taking in consideration some of your and MRAB suggestions. > > Could you give me an example on how could I use the datetime.timedelta > function in this particular case.
td1 = timedelta(minutes=mins1, seconds=secs1, milliseconds=hundredths1*10) td2 = timedelta(minutes=mins2, seconds=secs2, milliseconds=hundredths2*10) average = (td1 + td2) / 2 mins, secs = divmod(average.seconds, 60) hundredths = average.microseconds // 10000 print("{:02d}:{:02d}:{:02d}".format(mins, secs, hundredths)) -- http://mail.python.org/mailman/listinfo/python-list