-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBA1G.py
12 lines (10 loc) · 2.18 KB
/
BA1G.py
1
2
3
4
5
6
7
8
9
10
11
12
dna1 = "TGGCCTGTACGGACCGTGCCCAACTTAAAGGAATCTGACCCCTTAACTTGCTCGCCCCCAGCGTGACCTCAATCCTTCCATCCCGCAGTTCGATCTCGTCATGATCCCCATGCCTCATAAATTTTACTGGAGCGGATACCATCTAGATGGGCATACCCAATGTCTACTCCCGGTTTGCTGTGTATGCAACACCTTCGAAGCGGTCTGCATGTGATTGCCATTCAGCCCTCCCACGGTCTTTCGAGTGATCTGGGTAGCAGGTCGATCAACATGGCTGTGCAGTGCCGTCTAGATTTTGAGCGTTGCCGGCAATGTCCGTCGCAACATATAGGCCAAAGTAGGACAGGGTTAGATTCGCGAAGGCGCGTCCCGACTTCTCTCGAGGCGTAGTGCTAGCTTAGAACGTATGACAATTGACTCTGAGCAATGATCCATTTAGGTGGAATGATTATGTTGGATGCGAGGGCACTTTAGCATTGCTCGGCATGCAGAGCACTGATTCGAGCTTGCATGATATAACCACTCTATATCCACAGTGAACGAAGATATCCGCTTATAGCAACCAACGAAGAGGGCCTTTGTAAAGCAATTTCGTGAATGGGCGATGTATCTCCGAATCTCGTCTTATGCGTTCTCGACTTAGAAAGCTCCACCAACCCTACCGTGAGCAGAACTGCCGGGCCACCACGCCCTGGAATAGGTCCATGCAGCCCTTGAGTCCAGCGGATTGGGGAGGAGTCACGCCATACCCAAAGCCGGCTGTACCCCGTAGTTATACCAGAATCTATGCTCTCACCCGGATTTCACTTGTCATCACTCTTCTTCGAACTGTATCATCTAGTAAGCGTGCTAACGGCTACGGGGCATTAATTGTTACTTACCTAAACCGCCTCCTTAGCTGATTAGCCCCCACACCGGTGAGTATAGAAGCTAACTGATGTGTCTCTCCGGTAAACTGAAAACCAACATAGTGCGCCTAGTTCCTCGGCTGGCCGACCAGGATGTCCGGGGGCTTTAAGTATGACCCGGCCTCTTTTTCTGAGTG"
dna2 = "TTCATGTAGACTGGCATCTCTTCCGCTCCGGTGCTAAAGGACTTACGACTTATGGGACTAGTGCCCTGTCAAACCAGATTTTTATGCATCACAACCCGACGAAAATAATCCTCTGCACGAGTGATAAGATGAGAAAGACGACGTTCCGTTTGCTGGCTACGCAGACTACTGAGGTGGCCCCACCATATATCCCCTAGTATGTTGTTCGATAACTTGTTCATCTATATATGTGTTACCCGTGAGGTAGTCTATGCAACCGCTAGATGTCGCTGGCGAGATTCTCACCTAGGTCCAAGTATGGGTTGCCCTGACACATAGTGTGTAATAACAACCTTCTCGCAAAAATATCTGTGCTTTGTGCTTGTCTTAATCCAGTGCCGAGGTCAGACTCCTGCGGATTTGGAGGAAGTCTTGTGATAACTCGACCCGACCCGACCCAGATGTGGATATACGTGAACTATACACATGTCGTTTGCGGGTGAATTTTCTGCACGTATGTGTCACATCGAATCCCAGTGCATAAAATAGGCCCTGATGCTGTATGCCCACAGCCAAATTTATTAGTTATCATCATACCGATTCCATTGTAGCGGACATTAGTAGTCCCTCGCGAAGGCGGATTGGCATGTTACGCTATTTTTTGGCTGTACTCCATTGAGTTCTGAGAAGGTGACGCGCCGGTCGACCGCCTGGCGCCCGTCCGTCGACCCAGCTTGTACCCTTGAGTGGGTCACAAGCCTACTGAACCACGTTGTACTCGGCTTGTCGCGGTGTCAAGTTCCCGAGTTAGTTAAATAGACCACGTAACTTATGTGTAGCCGTCCAGGCAGACGCAGTTGATTCGCTGTGGTATGTACCCCTTTCATCTGGAGTACCTGGGCTACGTCGTGCCAGTGGAGGCCACGGAGGAAAAAAAGATATTCCTATGACAAGACTGCTCTGTTCTTAGGAGGTCCCCACCAGCATAGACCGAGGTTAAATAAGTGCGTGCAAGCACCGTTCGATGTCAGATCCATGAATACAATTTACGCCACGGCTCCAAATA"
n = len(dna1)
m = len(dna2)
mn = min(n, m)
hd = 0
for i in range(mn):
if not(dna1[i] == dna2[i]):
hd += 1
print(hd)