Why does datetime.now() not a string?


I just wanna know why we don't use the apostrophes here in this situation. Someone please tell why!!


Because it is a compound object...

from datetime import datetime
now = datetime.now()
print now
print type(now)
2016-08-28 22:15:33.703436
<type 'datetime.datetime'>


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