[Solved] How to find the difference between two lists of tuples


you can use basic for loop and if statement to check values:

List_1 = [((1.1, 2, 3), (1.1, 2, 3, 4), (3, 4, 5), 5, 6, 7)]
List_2 = [((1.1, 2, 3), (1.1, 2, 3, 4), (3, 4.4, 5), 5, 6, 7)]

List_1 = list(List_1[0]) # [(1.1, 2, 3), (1.1, 2, 3, 4), (3, 4, 5), 5, 6, 7]
List_2 = list(List_2[0]) # [(1.1, 2, 3), (1.1, 2, 3, 4), (3, 4.4, 5), 5, 6, 7]

for i in range(len(List_1)):
    if List_1[i] != List_2[i]:
        print ("Error: {}".format(List_2[i]))

output:

Error: (3, 4.4, 5)

0

solved How to find the difference between two lists of tuples