title: Insert key in default dict to the front
body: <p>I have this defaultdict and a string variable:</p>
  
  <pre><code>my_dict = defaultdict(&lt;class 'str'&gt;, {2: 'bear', 3: 'fish', 4: 'dog', 5: 'goat'})
  
  str_match = "goat"
  </code></pre>
  
  <p>and I would like to pop the key in <code>my_dict</code> which has the same value as <code>str_match</code>, and insert it at the front. Something like this:</p>
  
  <pre><code>my_dict = defaultdict(&lt;class 'str'&gt;, {5: 'goat', 2: 'bear', 3: 'fish', 4: 'dog'})
  </code></pre>
  
  <p>So far I have:</p>
  
  <pre><code>for key, value in list(my_dict.items()):
      if value == str_match:
          my_dict.pop(key)
  </code></pre>
  
  <p>Is there a way I can accomplish this?   </p>