how to find range of dates in between two dates unsing python

Solutions on MaxInterview for how to find range of dates in between two dates unsing python by the best coders in the world

showing results for - "how to find range of dates in between two dates unsing python"
Cristina
09 Sep 2016
1
2sdate = date(2008, 8, 15)   # start date
3edate = date(2008, 9, 15)   # end date
4
5delta = edate - sdate       # as timedelta
6
7for i in range(delta.days + 1):
8    day = sdate + timedelta(days=i)
9    print(day)