May-02-2018, 08:41 PM
Hi,
I'm working on a Exercism programming exercise for transcribing DNA into RNA.
My code looks like this:
Regards,
Atalanttore
I'm working on a Exercism programming exercise for transcribing DNA into RNA.
My code looks like this:
def dna_to_rna(dna_strand): dna_rna = {'G':'C', 'C':'G', 'T':'A', 'A':'U'} dna_list = list(dna_strand) rna_list = [] for dna in dna_list: rna_list = rna_list.append(dna_rna[dna]) return rna_list dna_to_rna('ATCGGTTA') # Test functionUnfortunately, this code produces following error and I have no clue why:
AttributeError: 'NoneType' object has no attribute 'append'What's the reason for this 'NoneType' object?
Regards,
Atalanttore