From 06e7f085863f84371a14ed492cde5958c001a5f6 Mon Sep 17 00:00:00 2001 From: Pascal Lais Date: Wed, 8 Dec 2021 09:05:44 +0100 Subject: [PATCH] Update day 8 solution --- day-08/day-08.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/day-08/day-08.py b/day-08/day-08.py index eebc9b7..7c5b511 100644 --- a/day-08/day-08.py +++ b/day-08/day-08.py @@ -9,13 +9,7 @@ def part_1(input): _, out = line.strip().split(' | ') out = out.split() for d in out: - if len(d) == 2: - result += 1 - elif len(d) == 4: - result += 1 - elif len(d) == 3: - result += 1 - elif len(d) == 7: + if len(d) in [2, 3, 4, 7]: result += 1 print("Part 1 result:", result)