how to add real time in ppython code example
Example 1: print time python
from datetime import datetime
now = datetime.now().time() # time object
print("now =", now)
print("type(now) =", type(now))
Example 2: get date and time python
from datetime import datetime
now = datetime.now()
print (now.strftime("%Y-%m-%d %H:%M:%S"))