title: Compare one Dictionary Key with another Dictionary Value and create a new Dictionary
body: <p>I want to create a New dictionory by comparing one dictionry key with another dictionory value</p>
  <p>i tried with following code but it's not giving expected results</p>
  <pre><code>dictionary1 = {a: 1, b: 2}
  dictionary2 = {2: d, 1: e}
  common_pairs = dict()
  for key in dictionary1:
      if (key in dictionary2 and dictionary1[key] == dictionary2[key]):
        common_pairs[key] = dictionary1[key]
  print(common_pairs)
  </code></pre>
  <p>I am expecting output like below</p>
  <pre><code>{a: e, b: d}
  </code></pre>
  <p>Thanks in Advance!!</p>