From 8c0e9e4bdaa1d6c43305084e0d8f79e1ccb7dd13 Mon Sep 17 00:00:00 2001 From: Pascal Lais Date: Fri, 10 Dec 2021 08:50:14 +0100 Subject: [PATCH] Update day 10 solution --- day-10/day-10.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/day-10/day-10.py b/day-10/day-10.py index 2328279..5eb6b59 100644 --- a/day-10/day-10.py +++ b/day-10/day-10.py @@ -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: