@dna.setter<EOL><INDENT>def dna(self, dna):<DEDENT>
assert self.length == len(dna)<EOL>i = <NUM_LIT:0><EOL>for gene in self.genes:<EOL><INDENT>gene.dna = dna[i:i + gene.length]<EOL>i += gene.length<EOL><DEDENT>
Replace this chromosome's DNA with new DNA of equal length,
assigning the new DNA to the chromosome's genes sequentially.

For example, if a chromosome contains these genes...
  1. 100100
  2. 011011

  ...and the new DNA is 111111000000, the genes become:
  1. 111111
  2. 000000