How do I store the result of datetime.now() in the now variable?


#1



https://www.codecademy.com/courses/python-beginner-en-zFPOx/0/2?curriculum_id=4f89dab3d788890003000096#


My error message is "Oops, try again. Did you store the result of datetime.now() in the now variable?"


How do I store the result of datetime.now() in the now variable?


from datetime import datetime
now = "datetime.now()"
print "now"


#2

here:

"datetime.now()"

why did you make datetime into a string? now() is a method, no need to use quotation marks, same for now on the next line. its a variabl


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.