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)