summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2023-12-03 13:01:08 +0000
committerTomasz Kramkowski <tomasz@kramkow.ski>2023-12-03 13:01:08 +0000
commit65abc2babd3ef8dffa93ec6e764ab99ac432bca2 (patch)
tree075bafbee74038810bb85c5be2ba48997a6f04b1
parent333eb5be3466e8e74bd8f8eb50d5f30393ebc2dd (diff)
downloadaoc2023-65abc2babd3ef8dffa93ec6e764ab99ac432bca2.tar.gz
aoc2023-65abc2babd3ef8dffa93ec6e764ab99ac432bca2.tar.xz
aoc2023-65abc2babd3ef8dffa93ec6e764ab99ac432bca2.zip
stop touching global
-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