【datetime】模块运用,日期时间操作 import datetime nowtime=datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') print(nowtime)