Right now I have a nested list and I need a function to create a new list that combines element 0 and element 1 if they are the same. If they are the same it also adds the 3rd elements together.
Sample input:
input_list = [['123', '6', '2'], ['123','4','55'], ['123','6','3']
Expected output:
output_list = [['123','6','5'], ['123','4','55']]
123 and 6 were the same so it got combined and then 2+3=5
123,4,55 doesn't have any duplicates so it stays the same
Thank you in you advance