diff --git a/puzzles/day10.py b/puzzles/day10.py index 7df9b1f..85dc4af 100644 --- a/puzzles/day10.py +++ b/puzzles/day10.py @@ -12,11 +12,10 @@ from typing import Dict, List, Tuple from statistics import median - class Subsystem: nav_data = None - open_chars = ['(', '[', '{', '<'] - close_chars = [')', ']', '}', '>'] + open_chars = ["(", "[", "{", "<"] + close_chars = [")", "]", "}", ">"] def __init__(self, inputs: List[str]) -> None: self.nav_data = inputs @@ -42,7 +41,7 @@ class Subsystem: corrupted_chars.append(char) break - del opens[-1] # Clear the open bracket + del opens[-1] # Clear the open bracket if corrupted: chunks["corrupted"].append(line) @@ -73,7 +72,6 @@ class Subsystem: return median(total_scores) - def part1(inputs: List[int]) -> int: s = Subsystem(inputs) return s.score_corrupted()