abuzhang

python获取当前时间

########


import time

def logger(n):
time_format = '%Y-%m-%d %X'
time_current = time.strftime(time_format)
with open('log.txt','a') as f:
f.write('and action%s\n'%n)

posted on 2018-03-05 13:41  abuzhang  阅读(264)  评论(0编辑  收藏  举报

导航