def days_between(d1, d2):
d1 = datetime.strptime(d1)
d2 = datetime.strptime(d2)
return abs((d2 - d1).days)
ostalos = days_between('20-05-10','25-07-10')
print(ostalos)
TypeError: strptime() takes exactly 2 arguments (1 given)
почему не работает? def days_between(d1, d2):
d1 = datetime.strptime(d1, '%y-%m-%d')
d2 = datetime.strptime(d2, '%y-%m-%d')
return abs((d2 - d1).days)