I've searched and couldn't find the way I'm looking for to add the sum when dealing with tuples. Both a and b are tuples which are immutable and I'm trying to add their values so I can find the max. I know how to do it with dictionaries by calling the sum function and max() but not with tuples though so any help please. I know it's kind of tricky since its a tuple and tuples are immutable and can't be changed, but i'm not changing them, I just want to know the sum and add the largest one to another tuple.
a = [(1,2),(4,5),(1,0)]
b = [(3,2),(9,4),(2,2)]
Output:
a=[(3),(9),(1)]
b=[(5),(13),(4)]
Since (4,5) = 9 in tuple a and thats the max of a, move it to another tuple and a should now be this:
a = [(1,2),(1,0)]
The same goes for tuple b.