Python Dates and Times in Python Let's Build a Timed Quiz App Simple Time Machine

simple time machine - " module not callable"

I am confused
import datetime

starter = datetime.datetime(2015, 10, 21, 16, 29)

def delorean(int):
    return datetime(starter + datetime.timedelta(int+1))

1 Answer

Some hints:

  • You don't need to try and convert starter + time delta to a datetime
  • You do need a time delta of specified hours. You can use (hours=myparameter)
  • I would use a different parameter name than int since that is a builtin method