title: Why Aren't the input commands working when another value is changing in the background in python
body: <p>I want an input to register while the Mario.air value is counting down in the background. But input doesn't register for some reason. How do I make the input register? For example if you dive by type zz it registers the 1st time since the Mario.air value isn't counting down. But when it does start to count down The input suddenly stops registering.  </p>
  
  <pre><code>import time
  Start_2 = time.time()
  
  class Mario:
    x_location = 0 
    y_location = 0
    z_location = 0 
    health = 3
    Water = False
    air = 63
  
  class Water:
    x = 0
    y = -1
    z = 0
    bottom = -90
    top = 0 
  
  start = input('say yes then press zz: ').lower() 
  while start == 'yes':
    command = input('').lower()
    rules_2 = [Mario.x_location == Water.x,
    Mario.z_location == Water.z]
    if Mario.health == 0:
      print('Too bad')
      print('You died')
      print('Health: ', Mario.health)
      break
    if not Mario.Water:
      if all(rules_2):
        Mario.Water = True
        print('You are swimming')
    if command == 'zz' and not Mario.y_location == Water.bottom:
        Mario.y_location -= 5 
        print(Mario.x_location, Mario.y_location, Mario.z_location)
    if Mario.Water and Mario.y_location &lt; -1:
     while Mario.air &gt;= 0:
        Mario.air -= 1
        time.sleep(1)
        if Mario.air == 0:
          while Mario.air &lt;= 0:
            Mario.health -= 1
            print('Health: ', Mario.health)
            time.sleep(3)
            if Mario.health == 0:
              print('You drowned')
              break
  </code></pre>