AOC/2022/day05/part1.py
2024-08-29 17:12:29 +02:00

18 lines
396 B
Python

f = open("file");
s = f.read();
f.close();
splitted = s.split("\n\n");
default = splitted[0];
instructions = splitted[1];
resplitted = default.split("\n")
for i in range (len(resplitted) - 1):
letter = False;
for y in range (len(resplitted[i] - 1)):
if (resplitted[i][y] == '['):
letter = True;
elif (letter):
letter = False;
tab[i ]