]> git.friedersdorff.com Git - max/advent_of_code_2021.git/blob - 8_1.py
Try day 14
[max/advent_of_code_2021.git] / 8_1.py
1 """Decode stupid 7 segment displays"""
2
3 count = 0
4 with open("8_input.txt") as f:
5     for line in f:
6         digits = line.split("|")[1].strip().split(" ")
7         for digit in digits:
8             if len(digit) in [2, 3, 4, 7]:  # Corresponds to 1, 7, 4, 8
9                 count += 1
10
11 print(count)