def daterange(startDate, endDate):
    for i in range(int((endDate - startDate).days)):
        nextDate = startDate + timedelta(i)
if nextDate.weekday() not in (5, 6):
    yield startDate + timedelta(i)
Генератор диапазона дат Python за рабочие дни