Source code for day23.lib.parsers

"""Day23 parsers."""
from day23.lib.classes import Maze


[docs] def get_maze(path: str) -> Maze: """Parse input file and return wellformed maze.""" rows: list[list[str]] = [] with open(path, encoding="utf8") as file: rows = [list(line.strip()) for line in file] return Maze(rows)