how to get the current time in python
Get current time with python time module
import time
print(time.time())
1586813438.419919
print(time.ctime())
Mon Apr 13 23:30:38 2020
Get current time with python datetime module
import datetime
print(datetime.datetime.now())
2021-11-13 23:30:38.419...
learnlinux.hashnode.dev1 min read