Combine two lists: aggregate values that have similar keys
<p>I have two lists or more than . Some thing like this:</p>

<pre><code>listX = [('A', 1, 10), ('B', 2, 20), ('C', 3, 30), ('D', 4, 30)]
listY = [('a', 5, 50), ('b', 4, 40), ('c', 3, 30), ('d', 1, 20), 
         ('A', 6, 60), ('D', 7, 70])
</code></pre>

<p>i want to get the result that move the duplicate elements like this:
my result is to get all the list from listX + listY,but in the case there are duplicated
for example
the element <code>('A', 1, 10), ('D', 4, 30)</code> of listX is presented or exitst in listY.so the result so be like this</p>

<pre><code>result = [('A', 7, 70), ('B', 2, 20), ('C', 3, 30), ('D', 11, 100),
          ('a', 5, 50), ('b', 4, 40), ('c', 3, 30), ('d', 1, 20)]
</code></pre>

<p><code>(A, 7, 70)</code> is obtained by adding <code>('A', 1, 10)</code> and <code>('A', '6', '60')</code> together</p>

<p>Anybody could me to solve this problem.?
Thanks.</p>
