What you are doing is turning the tuple into a str and then parsing that into a datetime. But you can also pass your (year, month, day)
tuple directly to the datetime constructor:
from datetime import datetime as dt
def days_diff(d1, d2):
d1 = dt(*d1)
d2 = dt(*d2)
return abs((d2 - d1).days)
# result: 3615899
print( days_diff((100,1,1), (9999,12,31)) )```
CLICK HERE to find out more related problems solutions.