Cleaned up the while loop

This commit is contained in:
danielwilczak101
2020-11-17 01:22:05 -05:00
parent 0d8fb6147c
commit 260d17bf91
3 changed files with 9 additions and 6 deletions

View File

@ -68,7 +68,9 @@ class SQL_Database:
""" Insert current generations population """
# Structure the insert data
db_chromosome_list = [(ga.current_generation, chromosome.fitness, chromosome.__str__())
db_chromosome_list = [(ga.current_generation,
chromosome.fitness,
chromosome.__str__())
for chromosome in ga.population.get_chromosome_list() ]
# Create sql query structure