You will need to import a library:
import datetime
First convert the strings to dates using datetime.strptime.
The important part of the code is the datetime.timedelta, is a function to sum days, month or years to a date.
Create a new list to store the dates + 1, and then alternate the old date with the new date, that was calculated.
dates = ['2022-01-01', '2022-01-08', '2022-01-21']
newDates = []
for date in dates:
tempDate = datetime.datetime.strptime(date, '%Y-%m-%d')
tempDate = tempDate + datetime.timedelta(days=1)
tempDate = tempDate.strftime('%Y-%m-%d')
newDates.append(date)
newDates.append(tempDate)
print(newDates)
Result:
['2022-01-01', '2022-01-02', '2022-01-08', '2022-01-09', '2022-01-21', '2022-01-22']
datetime.datetimeobject, add a day, and then format them back to strings. What part of this problem are you stuck on? Each of these has individually already been asked and answered on Stack Overflow. Asking a specific question allows us to direct you to the answer to your actual question.