Transcribing DNA into RNA

This is an extremely easy problem. We can just use the replace string method to replace the T’s with U’s:

def dna_transtribed_to_rna(dna_string: str) -> str:
    """
    Parameters
    ----------
    dna_string : Str
    DNA Nucleotide String (DNA String)   
    
    Returns 
    -------
    String
    Transcribes the DNA string into a RNA string (replaces Thymine with Uracil)
    
    
    Example
    -------
    Input: GATGGAACTTGACTACGTAAATT
    Output: GAUGGAACUUGACUACGUAAAUU
    """
    
    return dna_string.replace('T', 'U')

print(dna_transtribed_to_rna('GATGGAACTTGACTACGTAAATT'))
## GAUGGAACUUGACUACGUAAAUU
Kyle Reese
Kyle Reese
Senior Data Scientist

I am interested in statistics, applied mathematics, and computer science and their applications in insurance, finance, and biology.