datetime The module works with dates and time. x=datetime.datetime.now() x >>> datetime.datetime(2021, 5, 14, 13, 7, 18, 347271) timedelta It presents under datetime library which is generally used for calculating differences in dates and also can be used for date manipulations. from datetime import datetime, timedelta for day in range(5,0,-1): delta=timedelta(days=day) print(x-delta) >>> 2021-0..