From eea7f1b29d185179454eeebd836b1b5177eaf31a Mon Sep 17 00:00:00 2001 From: Sebastian Seedorf Date: Tue, 1 Dec 2020 22:32:01 +0100 Subject: [PATCH] Day 1 (fixed part 2) --- day01/part2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/day01/part2.py b/day01/part2.py index e920056..1cc188b 100644 --- a/day01/part2.py +++ b/day01/part2.py @@ -7,8 +7,8 @@ COUNT = 3 for vals in combinations(items, 3): if sum(vals) == 2020: - print("Found {} and {} and {}: Sum={} Product={}".format( - *vals, + print("Found [{}]: Sum={}, Product={}".format( + ", ".join(map(str, vals)), sum(vals), math.prod(vals) ))