title: Elif not executing in program
body: <p>I am writing a simple text-based game for a college course in which I need to be able to move between rooms until the exit criteria are met. The problem I am running into is I can't get the ELIF statement to work to set my location from the bedroom to the cellar. It keeps it as bedroom. I am not sure what I'm missing here.</p>
  <pre><code>rooms = {
      'Great Hall': {'South': 'Bedroom'},
      'Bedroom': {'North': 'Great Hall', 'East': 'Cellar'},
      'Cellar': {'West': 'Bedroom'}
  }
  
  
  location = 'Great Hall'
  direction = &quot;&quot;
  
  
  while direction != exit:
      print(&quot;\nYou are in the&quot;, location)
  
      possible_moves = rooms[location].keys()
      print(&quot;Possible moves:&quot;, *possible_moves)
  
      direction = input(&quot;Which direction do you wish to go? &quot;).strip().capitalize()
      print(&quot;You entered:&quot;, direction)
  
      if direction in possible_moves:
          if location == 'Great Hall':
              location = 'Bedroom'
  
          if location == 'Bedroom':
              if direction == 'North':
                  location = 'Great Hall'
              elif direction == 'East':
                  location = 'Cellar'
  
          if location == 'Cellar':
              location = 'Bedroom'
  
      elif direction is not possible_moves:
          if direction == 'Exit':
              print(&quot;Thank you for playing the game.&quot;)
              break
          else:
              print('Invalid direction.')
  </code></pre>