Python:Comparing Two Dictionaries
<p>The first Dict is fixed.This Dict will remain as it is List of Countries with there Short Names.</p>

<pre><code>firstDict={'ERITREA': 'ER', 'LAOS': 'LA', 'PORTUGAL': 'PT', "D'IVOIRE": 'CI', 'MONTENEGRO': 'ME', 'NEW CALEDONIA': 'NC', 'SVALBARD AND JAN MAYEN': 'SJ', 'BAHAMAS': 'BS', 'TOGO': 'TG', 'CROATIA': 'HR', 'LUXEMBOURG': 'LU', 'GHANA': 'GH'}
</code></pre>

<p>However This Tuple result has multiple Dict inside it.This is the format in which MySQLdb returns result:</p>

<pre><code>result =({'count': 1L, 'country': 'Eritrea'}, {'count': 1L, 'country': 'Togo'}, {'count': 1L, 'country': 'Sierra Leone'}, {'count': 3L, 'country': 'Bahamas'}, {'count': 1L, 'country': 'Ghana'})
</code></pre>

<p>Now i want to compare these both results With COUNTRY Names and If 'Country' in Result is present in firstDict then put the value.else put the 0
The result desired is:</p>

<pre><code>mainRes={'ER':1,'TG':1,'BS':3,'GH':0,'LU':0}
</code></pre>
