module time current date code example
Example 1: print time in python
import time
t = time.localtime()
current_time = time.strftime("%H:%M:%S", t)
print(current_time)
Example 2: python printing date
import datetime
print(datetime.datetime.now()) # --> (year, month, day, hour, minute, second, millisecond)