Files
Advent2023/10/advent_1.py

24 lines
435 B
Python
Raw Normal View History

2023-12-11 19:05:07 +02:00
def otsing(x, y, tase):
print(otsin)
with open("data.txt") as file:
lines = [line.rstrip() for line in file]
ruum = []
for line in lines:
ruum.append([*line])
print(ruum)
leitud = false
for x, rida in enumerate(ruum):
for y, koht in enumerate(rida):
print(f"x={x}, y={y}, koht={koht}")
2023-12-13 15:40:05 +02:00
if koht == 'S':
otsing(x, y, 0)
leitud = true
break
2023-12-11 19:05:07 +02:00
if leitud:
break