title: Python: get key with the least value from a dictionary BUT multiple minimum values
body: <p>I'm trying to do the same as 
  <a href="https://stackoverflow.com/questions/3282823/python-get-key-with-the-least-value-from-a-dictionary">Get the key corresponding to the minimum value within a dictionary</a>, where we want to get the key corresponding to the minimum value in a dictionary. </p>
  
  <p>The best way appears to be:</p>
  
  <pre><code>min(d, key=d.get)
  </code></pre>
  
  <p><strong>BUT</strong> I want to apply this on a dictionary with multiple minimum values:</p>
  
  <pre><code>d = {'a' : 1, 'b' : 2, 'c' : 1}
  </code></pre>
  
  <p>Note that the answer from the above would be:</p>
  
  <pre><code>&gt;&gt;&gt; min(d, key=d.get)
  'a'
  </code></pre>
  
  <p>However, I need <strong>both</strong> the two keys that have a minimum value, namely <code>a</code> and <code>c</code>.</p>
  
  <p>What would be the best approach?</p>
  
  <p>(Ultimately I want to pick one of the two at random, but I don't think this is relevant).</p>