I want to compare two lists: -CAGGTGGTGAT (my_list[0])
--CAGGTGTGAT (my_list[1])
And I want to find how many pairs I have (A-A, C-C, G-G, T-T) and how many mismatches. I have this code for the mismatches
for i in range(len(my_list[0])):
if my_list[0][i-1]!=my_list[1][i-1]:
print("mismatch")
How can i count how many mismatches are printed? I tried to use count, but it counts pairs and mismatches. I want to count only the mismatches that are printed.