python time for code example Example: time in python code import datetime x = datetime.datetime.now() print(x)