We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
in
len
1 parent 624e72c commit 4c25714Copy full SHA for 4c25714
2024/06/06.py
@@ -11,7 +11,7 @@ def print_map():
11
for idx in range(width + 1):
12
if (idy, idx) in obstacles:
13
print('#', end='')
14
- elif directions := guard_path[(idy, idx)]:
+ elif directions := guard_path.get((idy, idx)):
15
horizontal = LEFT in directions or RIGHT in directions
16
vertical = UP in directions or DOWN in directions
17
symbol = '+' if horizontal and vertical else '-' if horizontal else '|'
0 commit comments