Implementing Genetic Algorithm by Python