def _pick(self, gene):
        "chooses a random allele to replace this gene's allele."
        self.chromosome[gene] = random.choice(self.alleles)
chooses a random allele to replace this gene's allele.
recipes/Python/199121_a_simple_genetic_algorithm/recipe-199121.py