Difference between revisions of "Minsu Kim/python/Rosalind /problem6"
From Biolecture.org
imported>Minsukim (Created page with "<p><img alt="" src="/ckfinder/userfiles/images/bandicam%202017-12-12%2020-51-08-760.jpg" style="height:289px; width:1151px" /></p> <pre> f = open('rosalind_ba1g.txt', &#...") |
imported>Minsukim |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<p><img alt="" src="/ckfinder/userfiles/images/bandicam%202017-12-12%2020-51-08-760.jpg" style="height:289px; width:1151px" /></p> | <p><img alt="" src="/ckfinder/userfiles/images/bandicam%202017-12-12%2020-51-08-760.jpg" style="height:289px; width:1151px" /></p> | ||
− | < | + | <p>f = open('rosalind_ba1g.txt', 'r') # 열고<br /> |
− | f = open('rosalind_ba1g.txt', 'r') # 열고 | + | lines = f.readlines()<br /> |
− | lines = f.readlines() | + | seq_1 = lines[0]<br /> |
− | seq_1 = lines[0] | + | seq_2 = lines[1]<br /> |
− | seq_2 = lines[1] | + | f.close</p> |
− | f.close | ||
− | count = 0 | + | <p>count = 0<br /> |
− | for i in range(len(seq_1)): | + | for i in range(len(seq_1)):<br /> |
− | if(seq_1[i]!=seq_2[i]): | + | if(seq_1[i]!=seq_2[i]):<br /> |
− | count += 1 | + | count += 1<br /> |
− | | + | <br /> |
− | print(count)</ | + | print(count)</p> |
Latest revision as of 20:54, 12 December 2017
f = open('rosalind_ba1g.txt', 'r') # 열고
lines = f.readlines()
seq_1 = lines[0]
seq_2 = lines[1]
f.close
count = 0
for i in range(len(seq_1)):
if(seq_1[i]!=seq_2[i]):
count += 1
print(count)