I have the following lists
list1 = [[x1,1,b1],[x2,1,b1],[x3,1,b1],[x4,1,b1]]
and the following
list2 = [[x1,0,b1],[x5,0,b1],[x2,0,b1],[x7,0,b1]]
I don't know how to create a final list like the
list3 = [[x1,1,b1],[x2,1,b1],[x3,1,b1],[x4,1,b1],[x5,0,b1],[x7,0,b1]]
To keep the first list1 and add to list1 elements from list2 only if the list2[0][0] element does not exist in list1
I tried something like the following with several combinations
for i in list1:
for i2 in list2:
if i[0][0] != i2[0][0]
list3.append(i2)
But list3 displays elements which are common