From 5cd5b10ec109278cdf3a25915b131d0280a99311 Mon Sep 17 00:00:00 2001 From: aaron Date: Sat, 3 Dec 2022 14:44:09 +0100 Subject: [PATCH] fix comment --- 3/rucksack.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/3/rucksack.py b/3/rucksack.py index 838dd31..f3e260f 100644 --- a/3/rucksack.py +++ b/3/rucksack.py @@ -56,10 +56,8 @@ if __name__ == "__main__": print(f"sum of priorities of all common items amongst compartments: {answer_a}") submit(answer_a, part="a", day=3, year=2022) - # part b: determine the priority of common items in groups of three - # split the supply list into groups of three + # part b: determine the priority of common items in groups of three and create a priority summary groups = [supplies[i : i + 3] for i in range(0, len(supplies), 3)] - # create a list of each groups priority and sum it all up answer_b = sum([eval_badge_priority(group) for group in groups]) print(f"sum of priorities of all common items amongst groups of three: {answer_b}") submit(answer_b, part="b", day=3, year=2022)