title: Comparing 2 dictionaries in python by lookup
body: <p>I have 2 lists dictionaries that i have created that have "similar" data in them, basically it works like this:</p>
  
  <p>dictionary 1 looks like this:</p>
  
  <pre><code>{'category' : category, 'location' : location, 'count' : count}
  </code></pre>
  
  <p>dictionary 2 looks like this:</p>
  
  <pre><code>{'category' : category, 'location' : location, 'average' : average, 'create_datetime' : create_datetime}
  </code></pre>
  
  <p>Basically, what i want to do is compare the average value and the count value. The idea overall is that i want to see if the count is greater than the average, if it is, i will do something, otherwise i won't.</p>
  
  <p>How would i go about comparing these 2 values? My initial idea was to just put both of these dictionaries on a mysql table and compare them that way, but this is something that will need to run on a regular basis that i would prefer, if possible, to keep out of a table.</p>
  
  <p>Does anyone have some advice on where to start? Thanks!</p>