Python generate dates series
Question: How can i generate array with dates like this:

Timestamps in javascript miliseconds format from 2010.12.01 00:00:00 to
2010.12.12.30 23.59.59 with step 5 minutes.

    
    
    ['2010.12.01 00:00:00', '2010.12.01 00:05:00','2010.12.01 00:10:00','2010.12.01 00:15:00', ...]
    


Answer: Well, obviously you start at the start time, loop until you reach the end time
and increment inbetween.

    
    
    import datetime
    
    dt = datetime.datetime(2010, 12, 01)
    end = datetime.datetime(2010, 12, 30, 23, 59, 59)
    step = datetime.timedelta(seconds=5)
    
    result = []
    
    while dt < end:
        result.append(dt.strftime('%Y-%m-%d %H:%M:%S'))
        dt += step
    

Fairly trivial.

