Possible Duplicate:
Iterating through a range of dates in Python
I got a method where I pass in a start date and an end date. the end result is I want all the dates between the start date and end date as a list. For eg if the start date is '2013-01-01' and the end date is '2013-01-04' then ['2013-01-01','2013-01-02','2013-01-03','2013-01-04'] should be returned. I could do something like the below. But wondered if there a simple way I havent considered
year = int(startdate.split('-')[0])
month = int(startdate.split('-')[1])
day = int(startdate.split('-')[2])