Improve input parsing
This commit is contained in:
@@ -11,7 +11,7 @@ test_input = """
|
||||
........#.
|
||||
#.........
|
||||
......#...
|
||||
""".strip()
|
||||
"""
|
||||
|
||||
test_solution_p1 = 41
|
||||
test_solution_p2 = 6
|
||||
@@ -51,7 +51,7 @@ def _parse_map(puzzle_input: str) -> MapInfo:
|
||||
puzzle_map = []
|
||||
guard = None
|
||||
|
||||
for x, line in enumerate(puzzle_input.split("\n")):
|
||||
for x, line in enumerate(puzzle_input.strip().split("\n")):
|
||||
if not line:
|
||||
continue
|
||||
line_list = list()
|
||||
|
Reference in New Issue
Block a user