title: reversing dictionary in python
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/483666/python-reverse-inverse-a-mapping">Python reverse / inverse a mapping</a><br>
    <a href="https://stackoverflow.com/questions/4413976/swap-keys-for-unique-values-in-a-dictionary-in-python">Swap keys for unique values in a dictionary in Python</a>  </p>
  </blockquote>
  
  
  
  <p>Hello i want to understand how to reverse and compare dictionary values: for example :</p>
  
  <p>if i have one dictionary with key:value format like this</p>
  
  <pre><code>     dicta =  [1:2, 9:8, 4:6, 3:2, 0:7, 1:34, 9:90, 1:8, 67:43, 54:23]
  </code></pre>
  
  <p>How do i reverse it such that values of dicta above become keys and keys become values like this:</p>
  
  <pre><code>     dictb =  [2:1, 8:9, 6:4, 2:3, 7:0, 34:1, 90:9, 8:1, 43:67, 23:54]  
  </code></pre>
  
  <p>I am using python 2.5
  pls help</p>