def function_population(new_genome, num_organisms, fitness_calculator):
 all_orgs = []
 for org_num in range(num_organisms):
  cur_genome = new_genome()
  all_orgs.append(Organism(cur_genome, fitness_calculator))
 return all_orgs

def function_population ( new_genome , num_organisms , fitness_calculator ) : all_orgs = [ ] for org_num in range ( num_organisms ) : cur_genome = new_genome ( ) all_orgs . append ( Organism ( cur_genome , fitness_calculator ) ) return all_orgs
generate a population given a function to create genomes arguments: o new_genome - a function or callable object that will return a genome that can be used for a new organism .