Open main menu

Biolecture.org β

Changes

Minsu Kim/python/Rosalind /problem6

430 bytes added, 20:54, 12 December 2017
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', &#..."
<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(&#39;rosalind_ba1g.txt&#39;, &#39;r&#39;) # 열고
lines = f.readlines()
seq_1 = lines[0]
seq_2 = lines[1]
f.close

count = 0
for i in range(len(seq_1)):
&nbsp; &nbsp; if(seq_1[i]!=seq_2[i]):
&nbsp; &nbsp; &nbsp; &nbsp; count += 1
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
print(count)</pre>
Anonymous user