title: How can the symmetric difference between two lists of two-element sublists be obtained?
body: <p>I have two lists each of which contain two-element lists.</p>
  
  <pre><code>a = [['Adolf', '10'], ['Hermann', '20'], ['Heinrich', '30'], ['Heinrich', '15']]
  b = [['Rudolf', '40'], ['Adolf', '50']]
  </code></pre>
  
  <p>I want to get the 'symmetric difference' of the two lists, based on the 'key' first elements of the sublists.</p>
  
  <p><img src="https://i.stack.imgur.com/ivtPU.png" alt=""></p>
  
  <p>This 'symmetric difference' would be the following:</p>
  
  <pre><code>c = [['Hermann', '20'], ['Heinrich', '30'], ['Heinrich', '15'], ['Rudolf', '40']]
  </code></pre>
  
  <p>So, the 'Adolf' entries have been removed because they exist in both lists, while the others, including the 'Rudolf' entry, have been included because they exist not in both lists.</p>
  
  <p>Another example would be the following:</p>
  
  <pre><code>a = [['Adolf', '10'], ['Hermann', '20'], ['Heinrich', '30'], ['Heinrich', '15']]
  b = [['Heinrich', '25']]
  c = [['Adolf', '10'], ['Hermann', '20']]
  </code></pre>
  
  <p>I feel that this must be achievable through some clever list comprehensions, but I'm not quite sure how to approach it.</p>
  
  <pre><code>c = [x for x in a_pairs if x not in b_pairs]
  </code></pre>