Python Dates and Times in Python Dates and Times Far Away

Unashe Mutambashora
Unashe Mutambashora
2,483 Points

Passing timedelta through an argument

I tried this in pycharm as it seems to be getting the desired outcome

far_away.py
import datetime


def far_away(timedelta):
    return datetime.datetime.now() + datetime.timedelta(days=timedelta)