Getting the key for a value
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6748226/most-efficient-method-to-get-key-for-a-value-in-a-dict">Most efficient method to get key for a value in a dict</a><br>
  <a href="http://stackoverflow.com/questions/6776860/python-modify-a-dict-to-make-the-key-a-value-and-a-value-the-key">Python: Modify a dict to make the key a value, and a value the key</a>  </p>
</blockquote>



<p>In python, suppose we have a dictionary: </p>

<pre><code>mydict = {'myKey': 'myValue'}
</code></pre>

<p>To get the value for myKey we do</p>

<pre><code>myDict['myKey']
</code></pre>

<p>Suppose we need to do things the other way around.
What is the easiest way to get the key for value my value?</p>

<p>Note:  In this case my dictionary is static. The entries never change.</p>
