Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python time limit for input

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: ")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #time #limit #input
ADD COMMENT
Topic
Name
7+7 =