其他分享
首页 > 其他分享> > 031倒计时工具

031倒计时工具

作者:互联网

一、

cat countDown.py

#! /usr/bin/env python3.8.5
# -*- coding: utf-8 -*-
import time
import tkinter.messagebox
def countdown(m):
    try:
        m = int(m)
    except ValueError:
        print("Must be an integer!")
    else:
        while True:
            for minute in range(m, -1, -1):
                if minute == 0:
                    break
                for second in range(59, -1, -1):
                    time.sleep(1)
                    print("{}:{}".format(minute-1, second))
            break
if __name__ == '__main__':
    countdown(86)
    tkinter.messagebox.showinfo("arun","该切录屏啦!!!")

  

标签:__,countdown,messagebox,range,倒计时,second,工具,031,minute
来源: https://www.cnblogs.com/itcomputer/p/15334003.html