List duplicates manipulation

I am very new to python, and I am really lost right now. If anyone can help me, I will appreciate it a lot. I have a list: list1 = [((a, b), 2), ((a, b), 5), ((c, d), 1)), ((e, f), 2), ((e, f), 4)] …