I have already converted user input of DNA code (A,T,G,C)
into RNA code(A,U,G,C)
. This was fairly easy
RNA_Code=DNA_Code.replace('T','U')
Now the next thing I need to do is convert the RNA_Code into it's compliment strand. This means I need to replace A with U, U with A, G with C and C with G, but all simultaneously.
if I say
RNA_Code.replace('A','U')
RNA_Code.replace('U','A')
it converts all the As into Us then all the Us into As but I am left with all As for both.
I need it to take something like AUUUGCGGCAAA
and convert it to UAAACGCCGUUU
.
Any ideas on how to get this done?(3.3)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…