title: Python time.sleep() not sleeping
body: <p>I'm coding a game, and the fight function seems to be tripping me up. Here's the combat snippet of my code:</p>
  
  <pre><code>def combat(player, enemy, dun):
    print("\n"*100 + "A " + enemy.name + " has attacked you!")
    while player.health &gt; 0 and enemy.health &gt; 0:
      print(enemy.name[:1].upper() + enemy.name[1:], "health:", enemy.health)
      print("Your health:", player.health)
      cmd = input("&gt;")
      if cmd == "attack":
        enemy.health -= player.atk(enemy)
      if cmd == "run":
        coin = random.choice(["heads", "tails"])
        if coin == "heads":
          break
        else:
          print("You couldn't escape.")
      if cmd == "equip":
        target = input("Which item?\n&gt;")
        print(player.equip(target))
      player.health -= enemy.atk(player)
  
    if enemy.health &lt;= 0:
      print("You defeated the", enemy.name + "!")
      if enemy.drop != None:
        return "Enemy defeated.\nThe " + enemy.name + " dropped a " + enemy.drop + "!"
        dun.data[dun.pos][2].append(enemy.drop)
      else:
        return "Enemy defeated."
      time.sleep(1.5)
      out = 1
    elif player.health &lt;= 0:
      print("You died fighting %s..." % enemy.name)
      dun.pos == (0, 0)
      player.inventory == []
      return "You reawaken in the same room you started in, pack empty..."
      time.sleep(3)
  </code></pre>
  
  <p>I have imported the random module and the time module, it's just not in the snippet.</p>
  
  <p>When the sequence ends, it does not sleep and goes right away into the main game loop (which I can give if needed).</p>
  
  <p>Apart from being messy, what am I doing wrong?</p>