输出当地时间
import time while True: print(time.strftime('%Y-%m-%d-%H:%M:%S',time.localtime(time.time()))) time.sleep(1)
结果不统一,请自己尝试查看