advent-of-code-2023/python/day11.py

16 lines
342 B
Python
Raw Normal View History

2023-12-13 00:26:48 +01:00
path = 'res/01/input'
space = []
with open(path, 'r') as file:
for line in file:
space.append([1 if c is '#' else 0 for c in line])
if '#' not in line:
space.append([0 for _ in line])
ind = set()
for i in range(len(space[0])):
if '#' not in [space[i][j] for j in range(len(space))]:
ind.add(i)