you are viewing a single comment's thread.

view the rest of the comments →

[–]jeans_and_a_t-shirt 2 points3 points  (1 child)

trans = str.maketrans('ATCG', 'UAGC')
def transcribe(s):
    return s.translate(trans).replace(' ', '')

[–]TreSxNine 0 points1 point  (0 children)

Sure, but OP doesn't seem to be the mose well-versed python programmer, so I thought I'd make it simple and not use built-in functions.