# 暂停一秒输出,并格式化当前时间。

# 暂停一秒输出,并格式化当前时间。
1 import time
2 print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())))
3 time.sleep(1)
4 print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())))

 

posted @ 2021-10-22 19:38  余鑫2020  阅读(86)  评论(0)    收藏  举报