Name 'now' is not defined


Traceback (most recent call last):
File "python", line 2, in
NameError: name 'now' is not defined

from datetime import datetime
var = now


now is the variable, it should be on the left hand side of the equal sign. Then given it a value of the current datetime

the exercise shows you how to print the current date and time, now you have this knowledge, to store it in a variable named now instead of printing


really apprecaite ......thank u
its done