def log_print(*objects, sep=' ', end='\n', file=None):
# print("当前时间:" + datetime.now().strftime('%Y-%m-%d %H:%M:%S')) # 这样每次调用log_print()的时候,会先输出当前时间,然后再输出内容
# print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)
print(*objects, sep=' ', end='\n', file=file)
python重写print
最新推荐文章于 2024-07-30 17:15:49 发布