I have two string variables which contain dates in yyyy-mm-dd format as follows :
date1 = \'2011-05-03\'
date2 = \'2011-05-10\'
I want to write
>>> for a in range(9):
... print(datetime.date(2011, 05, 03) + datetime.timedelta(a))
...
2011-05-03
2011-05-04
2011-05-05
2011-05-06
2011-05-07
2011-05-08
2011-05-09
2011-05-10
2011-05-11
I'm not too sure whether the parsing of the strings was integral or just the way you started the question. If so, please disregard the answer as oversimplified