【Python】得到当前日期时间

import time

str=time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
print(str)
原文地址:https://www.cnblogs.com/heyang78/p/8810480.html