title: Python: Getting the difference between two dictionaries
body: <p>I'm trying to find a way to get the difference between 2 dictionaries, comparing the same keys and the values. That is the word and occurrences.</p>
  
  <p>Say I have two dictionaries:</p>
  
  <pre><code>Dict_1 = {' Chicago ': 3, ' Washington ': 5, ' LA ': 22, ' Boston ': 8, ' Seattle ': 0}
  Dict_2 = {' Chicago ': 4, ' Washington ': 9, ' LA ': 26, ' Boston ': 12, ' Seattle ': 2}
  </code></pre>
  
  <p>So what I after is the difference of occurrences, showing the differences in the two dictionaries.</p>
  
  <pre><code>[3-4, 5-9, 22-26, 8-12, 0-2] or like this [-1, -4, -4, -4, -2]
  </code></pre>
  
  <p>I then use those differences for calculations. I'm not very experienced with using dictionaries so any help is appreciated. </p>
  
  <p>I may also have to account for one dictionary not having the same keys. E.G.</p>
  
  <pre><code>Dict_1 = {' Chicago ': 3, ' Washington ': 5, ' LA ': 22, ' Boston ': 8, ' Seattle ': 0, ' Detroit ': 3}
  Dict_2 = {' Chicago ': 4, ' Washington ': 9, ' LA ': 26, ' Boston ': 12, ' Seattle ': 2}
  </code></pre>
  
  <p>Dictionary 1 has Detroit, an entry that dictionary 2 doesn't have. I still want to get the difference, which is going to be 3, as Dict 2 has 0 occurrences of Detroit.</p>