title: append last element of nested lists in another nested list if condition met
body: <p>I have 2 list of lists:</p>
  <pre><code>a = [[1,2,3], [4,5,6]]
  b= [[1,8,9], [4,10,11]]
  </code></pre>
  <p>I want to add the last elements in any list of <strong>b</strong> to the end of list <strong>a</strong> if they share the first element.</p>
  <p>for example, in my above lists, a and b share the first elements in their nested lists</p>
  <pre><code>a[0][0] = b[0][0]
  a[1][0] = b[1][0]
  </code></pre>
  <p>the result I want is</p>
  <pre><code>a = [[1,2,3,9], [4,5,6,11]]
  </code></pre>