Skip to content

Commit 18e863f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 057259e commit 18e863f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

genetic_algorithm/knapsack.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,7 @@ def run_ga(
317317
best_value, best_weight = result["best_value"], result["best_weight"]
318318

319319
print(f"Knapsack capacity: {result['capacity']}")
320-
print(
321-
f"Best solution: value = {best_value}, weight = {best_weight}"
322-
)
320+
print(f"Best solution: value = {best_value}, weight = {best_weight}")
323321
# # Uncomment to inspect chosen items:
324322
# best_items = [
325323
# items[idx] for idx, bit in enumerate(result["best_genome"]) if bit == 1

0 commit comments

Comments
 (0)