title: How to combine values composed of lists with common items in a dictionary using Python?
body: <p>I have a dictionary that resembles the following:</p>
  
  <pre><code>dict1 = {'key1':['1','2','3'],'key2':['3','4','5'],'key3':['6','7','8']}
  </code></pre>
  
  <p>I would like to merge all keys that have at least one common element and as a result.  For example, the resulting dictionary should look like:</p>
  
  <pre><code>dict1 = {'key1':['1','2','3','4','5'],'key3':['6','7','8']}
  </code></pre>
  
  <p>Please note how key2 has been eliminated.  Whether it is key1 or key2 that is eliminated does not matter.
  I have only gotten as far as being able to identify repeats, but not how to merge them in an iterative fashion.  Thanks</p>