I have used the following code to handle this task:
dna = input('Enter:')
b = {'A':'T', 'T':'A', 'C':'G', 'G':'C'}
for x,y in b.items():
dna = dna.replace(x,y)
print(dna)
However, it seems to be replacing only T and G, ignoring A and C. Can you please explain why it happens and how should I avoid this issue. Still pretty new to Python. Thank you in advance!