Open main menu

Biolecture.org β

Minsu Kim/python/Rosalind / problem2

Revision as of 20:04, 12 December 2017 by imported>Minsukim (Created page with "<p><img alt="" src="/ckfinder/userfiles/images/bandicam%202017-12-12%2019-47-24-450.jpg" style="height:313px; width:1000px" /></p> <p>f = open('rosalind_ba1c.txt','r...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

f = open('rosalind_ba1c.txt','r')
b = f.readline()
f.close

b = b[::-1]
text = list(b)

for i in range(0,len(text)):
    if text[i] == 'A':
        text[i] = 'T'
    elif text[i] == 'G':
        text[i] = 'C'
    elif text[i] == 'C':
        text[i] = 'G'
    elif text[i] == 'T':
        text[i] = 'A'
        
b = ''.join(text)

##print(b)