I’m writing a program that reads in two proteins of the same (string) length and returns how many of the amino acid letters are different. I managed to write the some of the bits but unfortunately couldn’t complete all of it so can any please guide through this by having a look on my code:
a = raw_input("Cheetah protein: ")
b = raw_input("Domestic cat protein: ")
u=zip(a,b)
d=dict(u)
x = 1
for i,j in d.items():
if i == j:
x = x + 1
print x
This the output I want to produce:
Cheetah protein: IGADKYFHARGNYDAA
Domestic cat protein: KGADKYFHARGNYEAA
2 difference(s).
1 Answer