def transcribe_coding_strand(seq): """Given a coding strand in 5'-3' order, create the corresponding messenger RNA (also in 5'-3' order), assuming that the whole coding strand is translated and that the mRNA is not rearranged during transcription.""" # Deal with both lists and strings if is_string(seq): sequence = seq elif is_list(seq): sequence = string.join(seq, '') else: parameter_error('transcribe_coding_strand', 1, "sequence", seq) # Do the real work result = sequence.replace('T', 'U') # Return the appropriate type if is_list(seq): return list(result) else: return result