#10、题目:暂停一秒输出,并格式化当前时间。 import time print(time.time())#timestamp print(time.localtime(time.time()))#struct_time print(time.strftime('%Y-%m-%d %X',time.localtime(time.time()))) for i in range(5): print (i) time.sleep(1) print(time.strftime('%Y-%m-%d %X',time.localtime(time.time())))