Using the library datetime
from datetime import date, timedelta
data_inicio = date(2021, 1, 1)
data_fim = date(2021, 2, 3)
delta = data_fim - data_inicio
lista_datas = []
for i in range(delta.days + 1):
day = data_inicio + timedelta(days=i)
lista_datas.append(day)
print(lista_datas)
The result will be
[datetime.date(2021, 1, 1), datetime.date(2021, 1, 2), datetime.date(2021, 1, 3), datetime.date(2021, 1, 4), datetime.date(2021, 1, 5), datetime.date(2021, 1, 6), datetime.date(2021, 1, 7), datetime.date(2021, 1, 8), datetime.date(2021, 1, 9), datetime.date(2021, 1, 10), datetime.date(2021, 1, 11), datetime.date(2021, 1, 12), datetime.date(2021, 1, 13), datetime.date(2021, 1, 14), datetime.date(2021, 1, 15), datetime.date(2021, 1, 16), datetime.date(2021, 1, 17), datetime.date(2021, 1, 18), datetime.date(2021, 1, 19), datetime.date(2021, 1, 20), datetime.date(2021, 1, 21), datetime.date(2021, 1, 22), datetime.date(2021, 1, 23), datetime.date(2021, 1, 24), datetime.date(2021, 1, 25), datetime.date(2021, 1, 26), datetime.date(2021, 1, 27), datetime.date(2021, 1, 28), datetime.date(2021, 1, 29), datetime.date(2021, 1, 30), datetime.date(2021, 1, 31), datetime.date(2021, 2, 1), datetime.date(2021, 2, 2), datetime.date(2021, 2, 3)]
Update - How to get dates in string format
from datetime import datetime
lista_datas_str = [datetime.strftime(dt, format="%d/%m/%Y") for dt in lista_datas]
print(lista_datas_str)
['01/01/2021', '02/01/2021', '03/01/2021', '04/01/2021', '05/01/2021', '06/01/2021', '07/01/2021', '08/01/2021', '09/01/2021', '10/01/2021', '11/01/2021', '12/01/2021', '13/01/2021', '14/01/2021', '15/01/2021', '16/01/2021', '17/01/2021', '18/01/2021', '19/01/2021', '20/01/2021', '21/01/2021', '22/01/2021', '23/01/2021', '24/01/2021', '25/01/2021', '26/01/2021', '27/01/2021', '28/01/2021', '29/01/2021', '30/01/2021', '31/01/2021', '01/02/2021', '02/02/2021', '03/02/2021']
end of update
I hope it helps
Mariano, edit your question and put example of your project, and the code of what you are trying to run.
– Heitor Scalabrini