📜  python 输入时间限制 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:31.386000             🧑  作者: Mango

代码示例1
import time
from threading import Thread

answer = None

def check():
    time.sleep(2)
    if answer != None:
        return
    print("Too Slow")

Thread(target = check).start()

answer = input("Input something: ")