The title may be misleading. I will try to explain as clear as possible. I have two set of lists :
a = [
[(1.5, 13), (1.5, 16)], #first list
[(5.4, 100.5), (5.3, 100.5)] #second list
]
b = [
[(1, 2), (1.5, 3)], #first list
[(5.4, 100.5), (5.3, 100.5)] #second list
]
I would like to compare first list of a with first list of b and so on. Remove duplicates if I found any. The final outcome will look like this :
c = [
[(1.5, 13), (1.5, 16), (1, 2), (1.5, 3)], #first list
[(5.4, 100.5), (5.3, 100.5) ] #second list
]
As you can see, a and b will eventually append forming c. However, duplicates will not be appended as shown in second list of c. Position is not mutable.
How can I achieve this efficiently?