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)
########
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)