DNA Becomes RNA

During transcription, a DNA strand is converted into RNA: most letters stay the same, but T becomes U. Write dna_to_rna, which takes a DNA string dna containing only G, C, A, and T, and returns the matching RNA string. Only the T characters should change.

Примеры

Ввод
"GCAT"
Вывод
"GCAU"
Ввод
"TTTT"
Вывод
"UUUU"
Ввод
"GACCGCCGCC"
Вывод
"GACCGCCGCC"

Нужно реализовать

def dna_to_rna(dna: str) -> str:

Теги

strings
PostgreSQLv16

Siia ilmub koodi käivituse tulemus

Visible tests
1
Input
"GCAT"
Expected"GCAU"
2
Input
"TTTT"
Expected"UUUU"
3
Input
"GACCGCCGCC"
Expected"GACCGCCGCC"
4
Input
"AAAATTTT"
Expected"AAAAUUUU"
5
Input
""
Expected""
6
Input
" "
Expected" "
Focus radio
Paused · SomaFM · Fluid