Python ProgrammingPython Programming

Python add 3 weeks to any specific date

Use Pendulum module to solve Date time problems.
Install it using below command

pip install pendulum
import pendulum

dt = pendulum.datetime(2012, 2, 15)
dt = dt.add(weeks=3)
print(dt.to_date_string())

Output
2012-03-07