title: Taking in multiple inputs for a fixed time
body: <p>I'm using Python 3 and I wanted to code a program that asks for multiple user inputs for a certain amount of time. Here is my attempt at that:</p>
  
  <pre><code>from threading import Timer
  ##
  def timeup():
      global your_time
      your_time = False
      return your_time
  ##
  timeout = 5
  your_Time = True
  t = Timer(timeout, timeup)
  t.start()
  ##
  while your_time == True:
      input()
  t.cancel()
  print('Stop typing!')
  </code></pre>
  
  <p>The problem is, the code still waits for an input even if the time is up. I would like the loop to stop exactly when the time runs out. How do I do this? Thank you!</p>