day 02: remove unnecessary import, clean up variable names

This commit is contained in:
Heiko Ludwig 2023-12-02 18:49:26 +01:00
parent cb8cc8034e
commit ed3dd5c5b2

View file

@ -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__':