Method and variable syntax


Replace this line with your code.

is .now a method ? and how could a method name be used as variable name ?


edit your post plz, .now is an method that need to call that module in first step, then use class or object.

never forget you can't import a method of class, just you can import class of modules.


from datetime import datetime

the first datetime is a module, but second datetime is a class of that mudule. and now() is method of that class :smiley:

or in act is

import datetime