I have a list of elements as given below-
[(a,1),(b,2),(c,3),(d,4),(e,5),(f,6),(a,7),(b,8),(c,9),(d,10),(e,11),(f,12)]
I am trying to add the value given next to a letter with a different value given next to the same letter.
For example- "a" has a value of 1, the program should compare "a" to all the terms in the list until it finds a match. Once it finds another term "a" having a value of 7, it should add the two values so that we get a=8.
Expected output is-
a=8, b=10, c=12, d=14, e=16, f=18