title: Dictionary changes without obvious reason
body: <p>I am trying to create a trivia game for learning reasons but something odd happens with my dictionary that I cannot understand. </p>
  
  <p>The code that I generally tested to see how things work is this: </p>
  
  <pre><code>cat = {
      'easy': {
          'books': 'https://opentdb.com/api.php?amount=50&amp;category=10&amp;difficulty=easy&amp;type=boolean',
          'films': 'https://opentdb.com/api.php?amount=50&amp;category=11&amp;difficulty=easy&amp;type=boolean',
          'general knowledge': 'https://opentdb.com/api.php?amount=50&amp;category=9&amp;difficulty=easy&amp;type=boolean',
          'music': 'https://opentdb.com/api.php?amount=50&amp;category=12&amp;difficulty=easy&amp;type=boolean',
          'science &amp; nature': 'https://opentdb.com/api.php?amount=50&amp;category=17&amp;difficulty=easy&amp;type=boolean',
          'sports': 'https://opentdb.com/api.php?amount=50&amp;category=21&amp;difficulty=easy&amp;type=boolean'
      },
      'medium': {
          'books': 'https://opentdb.com/api.php?amount=50&amp;category=10&amp;difficulty=medium&amp;type=boolean',
          'films': 'https://opentdb.com/api.php?amount=50&amp;category=11&amp;difficulty=medium&amp;type=boolean',
          'general knowledge': 'https://opentdb.com/api.php?amount=50&amp;category=9&amp;difficulty=medium&amp;type=boolean',
          'music': 'https://opentdb.com/api.php?amount=50&amp;category=12&amp;difficulty=medium&amp;type=boolean',
          'science &amp; nature': 'https://opentdb.com/api.php?amount=50&amp;category=17&amp;difficulty=medium&amp;type=boolean',
          'sports': 'https://opentdb.com/api.php?amount=50&amp;category=21&amp;difficulty=medium&amp;type=boolean'
      }
  }
  
  print(cat)
  
  for level in cat:
      print(level)
  
  catselect = []
  while catselect not in ("1", "2"):
      catselect = input("Select a category, for easy press 1, for medium press 2: ")
  
      if catselect == "1":
          selectedcat = "easy"
      elif catselect == "2":
          selectedcat = "medium"
      print(f"You selected the {selectedcat} difficulty level")
  
      print("The subjects can be: ")
      for i, cat[selectedcat] in enumerate(cat[selectedcat]):
          print(i, cat[selectedcat])
  
  print(cat)
  </code></pre>
  
  <p>So when at the end the code is running the cat dictionary is not the same any
  more and I don't have any reasoning this may happen.</p>
  
  <p>This is what I see:</p>
  
  <pre><code>{'easy': {'books': 'https://opentdb.com/api.php?amount=50&amp;category=10&amp;difficulty=easy&amp;type=boolean', 'films': 'https://opentdb.com/api.php?amount=50&amp;category=11&amp;difficulty=easy&amp;type=boolean', 'general knowledge': 'https://opentdb.com/api.php?amount=50&amp;category=9&amp;difficulty=easy&amp;type=boolean', 'music': 'https://opentdb.com/api.php?amount=50&amp;category=12&amp;difficulty=easy&amp;type=boolean', 'science &amp; nature': 'https://opentdb.com/api.php?amount=50&amp;category=17&amp;difficulty=easy&amp;type=boolean', 'sports': 'https://opentdb.com/api.php?amount=50&amp;category=21&amp;difficulty=easy&amp;type=boolean'}, 'medium': {'books': 'https://opentdb.com/api.php?amount=50&amp;category=10&amp;difficulty=medium&amp;type=boolean', 'films': 'https://opentdb.com/api.php?amount=50&amp;category=11&amp;difficulty=medium&amp;type=boolean', 'general knowledge': 'https://opentdb.com/api.php?amount=50&amp;category=9&amp;difficulty=medium&amp;type=boolean', 'music': 'https://opentdb.com/api.php?amount=50&amp;category=12&amp;difficulty=medium&amp;type=boolean', 'science &amp; nature': 'https://opentdb.com/api.php?amount=50&amp;category=17&amp;difficulty=medium&amp;type=boolean', 'sports': 'https://opentdb.com/api.php?amount=50&amp;category=21&amp;difficulty=medium&amp;type=boolean'}}
  easy
  medium
  Select a category, for easy press 1, for medium press 2: 1
  You selected the easy difficulty level
  The subjects can be: 
  0 general knowledge
  1 books
  2 films
  3 music
  4 sports
  5 science &amp; nature
  {'easy': 'science &amp; nature', 'medium': {'general knowledge': 'https://opentdb.com/api.php?amount=50&amp;category=9&amp;difficulty=medium&amp;type=boolean', 'books': 'https://opentdb.com/api.php?amount=50&amp;category=10&amp;difficulty=medium&amp;type=boolean', 'films': 'https://opentdb.com/api.php?amount=50&amp;category=11&amp;difficulty=medium&amp;type=boolean', 'music': 'https://opentdb.com/api.php?amount=50&amp;category=12&amp;difficulty=medium&amp;type=boolean', 'sports': 'https://opentdb.com/api.php?amount=50&amp;category=21&amp;difficulty=medium&amp;type=boolean', 'science &amp; nature': 'https://opentdb.com/api.php?amount=50&amp;category=17&amp;difficulty=medium&amp;type=boolean'}}
  </code></pre>
  
  <p>Where did all the categories for <code>easy</code> go? Why do I end up with <code>'science &amp; nature'</code> instead?</p>