-
Notifications
You must be signed in to change notification settings - Fork 3
/
BA1G.py
10 lines (9 loc) · 2.34 KB
/
BA1G.py
1
2
3
4
5
6
7
8
9
10
def hammingDistance(p, q):
ham = 0
for x, y in zip(p, q):
if x != y:
ham += 1
return ham
p = "AGGGGGCTCTTACCTTCGTCGTTCGTTGCAGCATCACGGATGCTAATAAAAGTGGCCGATAATCCATGTACATCCTATGACCTCCACGCGAACACACCAGCGGTTAGATCTCCCACTCGGTTTGTGTGAATTGCAACGGCGCGAGAAAATAAGTTTTTTTACCCGGTGGGGCCGCGAGACCACCCTAGATACCCAACCCCGGTACGATCAAAAAGGCGGGTTTGATTGACTACTAAGAAGTTTACGTCGGCTAGTCGTATCCGCTGGACATGCCCTGCTGAGCCTAACTGGTGACGCCACTTATACATCCAATAGAAGCCCTCCATCGGAAAGCGATCTATCATACTGACTGAATCACATAAGCCTCCTGACTCCTTGCTAGCACCAAGTCTTTCGTAAGATTAACGTTTTTGGCACTCATAGGAAGGAGGAATCTTTACTTTAGAACTTGCGTGTATAGTACTTCTTAGGCGGATGAACGGGAGCACTGAGGGACCGCAGGGATCTCGGGTTACCCGACCAACCAGCTAATTTATAGATACACTCGATACTGCCCATGGATTTCCCTACAAAAATAAAAGGCAGTGGATCGATACTATATTAGGGACCCGTAAGTCTGCAACATGTGCTTCGAGATCGCTAAAACTAATGGCAAACCCGTCGAGTCTGTCAGACCCCGTGGGGTCTCGCCTAGGTATGAGACCATAATGGGACTCACGTTCCAAGGTGTACGTGTGGTGCAATACCGCGGACTTGCTCGTCGGATCCAACACCTGTCATGGTCTAGTGCCGATGCTCAGGGGCCATTTTAAGTACCGGGTACGAGGTAGATCAGTCTGCTCCTAACGATTCACCTGGGGTTTCTACCCGTACCTTGATACTTTCATAACGGAAAATTAGAGTCTCTCTCGTACCCGCCGGACACCACGAGCCGTAAGGCTCTAGTCTAACACGGAGTCAGTTACAGATGCGATGTAAGGTTAGTTCTCTACCGTGATTAGGTTAGGCTGAATTATATGGTACAGTAATATCTTTGACGCGGATTTCCATTTCCAACACAGAGGGTGTTTGTCGGAAGCGACCGGACTTTCTAGTAACTTTTGAACTAATGTATCCACATTGAACTTGTC"
q = "TACCTGACTGATCGAGCGCCTTTTCAACACATAGTCGTGCACATTGAACCCCTGATGACTCTTTGTCCCCATTCGTGTCTTACCTATAGCGTAACAGTTTAGGGCCCCTACCGTGGTGCGGTAAATTCTATTGATCAAAAACGTCTACTATTTAAAATGACAAACACACAGTGTGGGATACTATGTAACCATGCCTCTGCGACAGGGGCGCTTTAACTACGTATATCAAGCCACGATGACAAGTGCATCCGAGCCCGAGTTAAATAATTCATGCATGTGTTGATGCAGGGGGCAGCGATAACCCTTACCATGCTCAGAGTGCACTTCACAACAGCGTCATCCGCCCTTCGCGTCAGGGATAACCCCGTTGAGCCGGCGCTATGCTCTGGCCCAATGGGACTACTCAGTGTGTGCATACTGCCTCATTCCACAGCGTATTTACTCCGCGGTACACGATCCCAGCACAGATGCGCGATTCATTACTAACAGAACGCGTAAACAGTTAGCAGATACGCACGGCCTGCTCAGGTAATTCCTTAGTGACGACCTACTGATCAAGAGCCGTCCGAATATCTCTCACAGATCCCGCATATATACACGAGGCACGTTCGCTTCTCAGTCGCCAGAACAAGTTGATAAGAGCATGGGAATTAAGGCGAATCAACACGTCCGGTCGCGGCTAGTGTCTTTGCCGTCATTACAACCCCCTACATCACAGATTGTACGCCGCATTGATAGAAACACATCAGATGCGAACCTTACTCCCATCCTTCGAGGTCGGGGAAAATCTGAGAAGAACCGTCGCCCCTCGGAGCACGGTTGTGCGAAAGGATTGAAGTCAACGCATCGCTCCTAGTACTTTTGCGGGAAAGCACTAGTCATCTCCATCTGTGCCGCGACAGGAACTTAACTAACGAGTACAGTCGGTAGCAACGGACAGCACACAAACCAGTCTCTTTACGACGAAATATTAACTGTCGTTGTCAATTCTACCCGATAAACGCTGGCTGTTCACATTAGTTACCCGGACTGCACGAAGGTATTTGGAATCCTCCGTATTCCTCTCACGTAAGAGGATGTATGTTTCTCGGAGTAGATGAGTTTAGAGGAAGACTGACAAGCCTATGAAG"
print(hammingDistance(p, q))