diff options
-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 |