From 65abc2babd3ef8dffa93ec6e764ab99ac432bca2 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Sun, 3 Dec 2023 13:01:08 +0000 Subject: stop touching global --- 3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.py b/3.py index 990c9ef..bb591a8 100644 --- a/3.py +++ b/3.py @@ -13,7 +13,7 @@ inp = [line.rstrip() for line in stdin] def find_adjacent_symbols( inp: list[str], ly: int, sx: int, ex: int ) -> Iterator[tuple[int, int]]: - for x in range(max(0, sx - 1), min(ex + 1, len(l))): + for x in range(max(0, sx - 1), min(ex + 1, len(inp[0]))): for y in range(max(0, ly - 1), min(ly + 2, len(inp))): if y == ly and sx <= x < ex: continue -- cgit v1.2.3-54-g00ecf