定时器

#coding:utf-8

import os
import time
num=0
while True:
time.sleep(1)
print(f"第{num}秒")
num+=1
if num==5:
os.system("start notepad")
if num==10:
os.system("taskkill /f /im notepad.exe")
else:
pass
posted @ 2021-03-18 11:13  cmlaiweno  阅读(30)  评论(0编辑  收藏  举报