Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. from datetime import timedelta, date
  2.  
  3. def daterange(start, end, 1):
  4.     L = timedelta(step)
  5.     while start.year < end.year or start.month < end.month or start.day < end.day:
  6.         yield start
  7.         start += L
  8.  
  9. for date in daterange(date(2011, 01, 01), date(2011, 05, 04)):
  10.     ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement