我想每5秒重复执行一次函数,同时从用户那里接受输入,并基于输入停止执行吗?前任:
def printit():
t=threading.Timer(3.0,printit)
t.start()
n=str(input())
if(n=='rajesh'):
t.cancel()
else:
#I want to continue the execution here
侃侃无极
慕桂英4014372
莫回无
MYYA
随时随地看视频慕课网APP
相关分类