If I had the two following lists with tuples in the form of (x,y):
[(a,1),(b,2),(c,7),(d,1)]
[(a,3),(b,2),(c,7),(d,8)]
I want to count the number of differences with respect to 'y' value for corresponding 'x' values. In the above case, the answer is 2
(a,1) doesn't match with (a,3)
(d,1) doesn't match with (d,8)
EDIT: This is not a duplicate, the position of the elements matter. I want to check if element 1 in list 1 is same as element 1 in list 2 and so on.