- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
from datetime import datetime, date, time, timedelta
date= datetime.now().date()
e = datetime.now().date()-timedelta(days=1)
ee = date
delta = e-ee
for i in range(0, delta.days+1):
dfa = ee+timedelta(days=i)
dfa = dfa.strftime('%Y-%m-%d')
print(dfa)