I'm able to import an RNA sequence (eg. AUGCCGACCCGCAGUCCCAGCG) and define a dictionary for translating it into a protein sequence (eg. AUG = M, CCG = Q, ACC = T). Every 3 letters of RNA sequence codes for one letter of protein sequence, and this translation is defined in the dictionary. How do I get Python to read the RNA sequence and output the protein sequence?
I've tried this code:
for i in range(0, len(rna_sequence), 3):
codon_dictionary = codon_dictionary + rna_sequence[i:i+3]
When I run it, nothing happens. No error message.
Edit: I forgot to add that I want the program to print the resulting protein sequence. I think RNA_sequence is defined as a string.