title: Dict Deconstruction and Reconstruction in Python
body: <p>I have multiple dictionaries. There is a great deal of overlap between the dictionaries, but they are not identical.</p>
  
  <pre><code>a = {'a':1,'b':2,'c':3}
  b = {'a':1,'c':3, 'd':4}
  c = {'a':1,'c':3}
  </code></pre>
  
  <p>I'm trying to figure out how to break these down into the most primitive pieces and then reconstruct the dictionaries in the most efficient manner. In other words, how can I deconstruct and rebuild the dictionaries by typing each key/value pair the minimum number of times (ideally once). It also means creating the minimum number of sets that can be combined to create all possible sets that exist.</p>
  
  <p>In the above example. It could be broken down into:</p>
  
  <pre><code>c = {'a':1,'c':3}
  a = dict(c.items() + {'b':2})
  b = dict(c.items() + {'d':4})
  </code></pre>
  
  <p>I'm looking for suggestions on how to approach this in Python. </p>
  
  <p>In reality, I have roughly 60 dictionaries and many of them have overlapping values. I'm trying to minimize the number of times I have to type each k/v pair to minimize potential typo errors and make it easier to cascade update different values for specific keys. </p>
  
  <p>An ideal output would be the most basic dictionaries needed to construct all dictionaries as well as the formula for reconstruction.</p>