0

How to stop getting input from input() when there is a delay before typing:

Code:

time.sleep(5) # assuming as delay
a = input()
print(a)

All works as assumed, but before 5 second when I type anything, it is given output. Is there a way to not get input until the delay is over?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
A VXQT
  • 1
  • Hi, what you are asking is OS-specific, Python does not receive input until you hit RETURN. What OS are you on? – alexis Aug 30 '23 at 10:25
  • your code runs as your desire with python-3.11.4 and windows 11, what's your OS ? – Ali Aug 30 '23 at 10:33

0 Answers0