From ed3dd5c5b294f3a6fd715f0cf5839f6b0e6676f7 Mon Sep 17 00:00:00 2001 From: Heiko Ludwig Date: Sat, 2 Dec 2023 18:49:26 +0100 Subject: [PATCH] day 02: remove unnecessary import, clean up variable names --- day_02/program.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/day_02/program.py b/day_02/program.py index 9b2ff86..2911650 100755 --- a/day_02/program.py +++ b/day_02/program.py @@ -2,8 +2,6 @@ # https://adventofcode.com/2023/day/2 -import re - def get_lines(filename: str) -> list: with open(filename, "r") as file: @@ -63,10 +61,10 @@ def main(): lines = get_lines("input.txt") cube_pools = {"red": 12, "green": 13, "blue": 14} games = get_games(lines) - sovg = get_sum_of_valid_games(games, cube_pools) - print(f"Part 1: The sum of valid games is: {sovg}") - power = get_power_of_games(games) - print(f"Part 2: The power of valid games is: {power}") + sum_of_valid_games = get_sum_of_valid_games(games, cube_pools) + print(f"Part 1: The sum of valid games is: {sum_of_valid_games}") + power_of_valid_games = get_power_of_games(games) + print(f"Part 2: The power of valid games is: {power_of_valid_games}") if __name__ == '__main__':