TIMESTAMP = "{0:_%Y-%m-%d,Time:%H:%M:%S}".format(datetime.now()) args.output = args.output + TIMESTAMP os.makedirs(args.output, exist_ok = True)
效果如上所示; 导入包语句是from datetime import datetime,注意是datetime而不是datatime,里面是date,此处极其容易手抖写错;
from datetime import datetime
datatime
date