Code doesnt work in python ide

from datetime import datetime
now =
print ('now')

this code works in the codeacademy ide but it shows error in the python 3 . 6. 4 idle which i have installed.


doesn’t work can mean many things, can you show in more detail what doesn’t work? Error message? Screenshot?

why are you printing a string, why not the variable which contains the current datetime



Your module is importing itself, not the built-in datetime module (rename your file)


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