1from datetime import timedelta, date
2
3def daterange(start_date, end_date):
4 for n in range(int ((end_date - start_date).days)):
5 yield start_date + timedelta(n)
6
7start_date = date(2013, 1, 1)
8end_date = date(2015, 6, 2)
9for single_date in daterange(start_date, end_date):
10 print(single_date.strftime("%Y-%m-%d"))