AOC/2022/day05/part1.py

18 lines
396 B
Python
Raw Normal View History

2024-08-29 11:12:29 -04:00
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 ]