python实现倒计时的示例
程序员文章站
2023-11-26 13:54:46
复制代码 代码如下:import timecount = 0 a = input('time:') b = a * 60 while (cou...
复制代码 代码如下:
import time
count = 0
a = input('time:')
b = a * 60
while (count < b):
ncount = b - count
print ncount
time.sleep(1)
count += 1
print 'done'