Update day 10 solution
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-12-10 08:50:14 +01:00
parent 124eed1c1f
commit 8c0e9e4bda

View File

@@ -27,19 +27,18 @@ def part_1(input):
def part_2(input):
result = 0
lines = input.copy()
scores = []
for line in input:
for line in input.copy():
seen = []
for c in line.rstrip():
if c in o_chars:
seen.append(c)
elif o_chars.index(seen[-1]) != c_chars.index(c):
lines.remove(line)
input.remove(line)
break
else:
del seen[-1]
for line in lines:
for line in input:
seen = []
for c in line.rstrip():
if c in o_chars: