summaryrefslogtreecommitdiffstats
path: root/3.py
diff options
context:
space:
mode:
Diffstat (limited to '3.py')
-rw-r--r--3.py2
1 files changed, 1 insertions, 1 deletions
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