In DNA strings, symbols 'A' and 'T' are complements of each other, as are 'C' and 'G'.
The reverse complement of a DNA string is the string formed by reversing the symbols of , then taking the complement of each symbol (e.g., the reverse complement of "GTCA" is "TGAC").
file=open('rosalind_revc.txt','r');
seq=file.read();
print(seq)
leng=len(seq);
tran={'A':'T','T':'A','C':'G','G':'C'};
trna=[];
for i in range(0,leng):
trna.append(tran[seq[leng-1-i]]);
trna_convert=''.join(trna);
f=open('out3.txt','w')
f.write(trna_convert)
f.close
ProblemIn DNA strings, symbols 'A' and 'T' are complements of each other, as are 'C' and 'G'.The reverse complement of a DNA string is the string formed by reversing the symbols of ,