Performing divison on timedelta object in python?

0 votes
How do I divide a timedelta object?
Aug 13 in Python by Fata
• 1,040 points
23 views

1 answer to this question.

0 votes

Refer the following piece of code:

e1=datetime.timedelta(days=32, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=4, weeks=8)
e2=datetime.timedelta(days=5, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=4, weeks=8)
e3=e1-e2
e4=e3//3
print(e4)

OUTPUT:

9 days, 0:00:00
answered Aug 13 by Wajiha
• 1,930 points