Dot notation and datetime object


Can someone explain to me the dot notation in this code?

I know that now() refers to the method which belongs to the class datetime. Please take a look at the module if needed

what I'm confused about is the "datetime" part of I read somewhere that it's supposed to be the instance of a class (the class is also called datetime if you look over the module) which the now() method belongs to, no? Since it's the instance shouldn't there be a line for the
code which is


This is to specify that the datetime instance is part of the datetime class right?

I'm sorry if this question makes no sense at all, since it's only been a day since i do Python. Thank you for your time.


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