我正在尝试获取将显示的倒计时。基本上就像一个世界末日时钟哈哈。
有人可以帮忙吗?
import os
import sys
import time
import datetime
def timer():
endTime = datetime.datetime(2019, 3, 31, 8, 0, 0)
def countdown(count):
while (count >= 0):
print ('The count is: ', count)
count -= 1
time.sleep(1)
countdown(endTime)
print ("Good bye!")
Run Code Online (Sandbox Code Playgroud)