+/AoC

advent of code

git clone https://git.julia.blue/+/AoC

Joseph Ryan18 is pretty good...df63c2c

master
254 B11 linesraw
1import re
2
3steps = []
4with open("test") as f:
5    for l in f:
6        on = len(l.split()[0]) == 2
7        x1, x2, y1, y2, z1, z2 = map(int, re.findall(r"-?\d+", l))
8        steps.append((on, ((x1, x2), (y1, y2), (z1, z2))))
9
10for s in steps:
11    print(s)