How to identify all identical lists from a list of lists?
<p>Hi! I hava a list of lists, and when the first element of the sublists are equal, i need to add the second elements of those and print the results. I have thought about it for long, but i just can't seem to figure out how this could be done. Here's an example of my problem: </p> 

<pre><code>num_list = [[1, 2], [3, 4], [1, 2], [3, 4], [3, 4]]

# 0th and 2nd sublists both have 1 as their first element.
# sum = 2 + 2. print out 4.

# all the remaining sublists have 3 as their first element.
# sum = 4 + 4 + 4. print out 12. 
</code></pre>

<p>Thank you very much!</p>

<p>PS: I'm aware that this kind of mapping would be better done with a dictionary, but this is just a simplified version of my problem. My actual program has sublists that have more than 2 values and i need to compare more than 1 value that need to be equal.</p>
