Adding together timedeta's in Python
So I have this list:
[datetime.timedelta(0, 1800), datetime.timedelta(0, 1800),
datetime.timedelta(0, 1800), datetime.timedelta(0, 1800)]
Collectively that is 2:00 hours, I'm trying to add those up to get 2:00
time delta. Which then in turn needs to be turned into a string of 2.0
Hours. Respectively 1:30 Hours would be 1.5 Hours as the final countdown.
No comments:
Post a Comment