python数字倒计时

 1 import time
 2 count = 0 
 3 a = input('time:') 
 4 b = int(a) * 60
 5 while (count < b):
 6  ncount = b - count 
 7  print('%dS'%ncount)
 8  time.sleep(1)
 9  count += 1 
10 print('done')

python数字倒计时

posted @ 2019-12-06 17:54  做梦者造梦  阅读(3171)  评论(0编辑  收藏  举报