Python - How to import 'timedelta' -- datetime

Import timedelta

To import timedelta, Add the following line to the top of your code.

from datetime import timedelta

 

For more information about timedelta:
datetime timedelta