title: How can you print a key given a value in a dictionary for Python?
body: <p>For example lets say we have the following dictionary:</p>
  
  <pre><code>dictionary = {'A':4,
                'B':6,
                'C':-2,
                'D':-8}
  </code></pre>
  
  <p>How can you print a certain key given its value? </p>
  
  <pre><code>print(dictionary.get('A')) #This will print 4
  </code></pre>
  
  <p>How can you do it backwards? i.e. instead of getting a value by referencing the key, getting a key by referencing the value.</p>