Start boilerplate for day05
This commit is contained in:
parent
dde27c2f46
commit
b0449d8f9e
|
@ -0,0 +1,10 @@
|
|||
0,9 -> 5,9
|
||||
8,0 -> 0,8
|
||||
9,4 -> 3,4
|
||||
2,2 -> 2,1
|
||||
7,0 -> 7,4
|
||||
6,4 -> 2,0
|
||||
0,9 -> 2,9
|
||||
3,4 -> 1,4
|
||||
0,0 -> 8,8
|
||||
5,5 -> 8,2
|
|
@ -0,0 +1,23 @@
|
|||
def ingest(input):
|
||||
paths = []
|
||||
for line in input:
|
||||
print(line)
|
||||
paths.append([[int(x) for x in point.split(",")] for point in
|
||||
line.split(" -> ")])
|
||||
return paths
|
||||
|
||||
|
||||
def part1():
|
||||
with open("day05.in", "r") as f:
|
||||
paths = ingest([line.rstrip() for line in f])
|
||||
print([[x[0][0], x[1][0]] for x in paths])
|
||||
print(paths)
|
||||
|
||||
|
||||
def main():
|
||||
print("=== PART 1 ===")
|
||||
part1()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in New Issue