What's wrong with my code?


#1

I'm not sure what I am doing wrong with my code.

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

Anyone see my error?


#2

You should read theory of exercise carefully.
If you look at theory...

from datetime import datetime

print datetime.now()

We've not put datetime.now() in quotes, right?

and as here we putting datetime.now() in a variable called now
so you can just print now ?


#3

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