1

How to break input function in python if the user does not write anything within 10 seconds in windows.

Suppose in below code:

n=input('Enter Your answer: ')

if the user does not put anything within 10 seconds then break input function and print('time up')

How to break input function in certain time ???

  • yes but it doesn't work on windows – Sandeep pushp Mar 16 '18 at 16:22
  • 2
    Whenever you find yourself saying “it doesn’t work,” you should edit your question to explain exactly what you tried and exactly how you know it doesn’t work (the error and any stack traces). – ndmeiri Mar 16 '18 at 16:27

0 Answers0