diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-12-03 13:01:08 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-12-03 13:01:08 +0000 |
commit | 65abc2babd3ef8dffa93ec6e764ab99ac432bca2 (patch) | |
tree | 075bafbee74038810bb85c5be2ba48997a6f04b1 | |
parent | 333eb5be3466e8e74bd8f8eb50d5f30393ebc2dd (diff) | |
download | aoc2023-65abc2babd3ef8dffa93ec6e764ab99ac432bca2.tar.gz aoc2023-65abc2babd3ef8dffa93ec6e764ab99ac432bca2.tar.xz aoc2023-65abc2babd3ef8dffa93ec6e764ab99ac432bca2.zip |
stop touching global
-rw-r--r-- | 3.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |