Files
python-aoc-2020/day06/part1.py
Sebastian Seedorf e06d2de6eb Day 6 (cleanup #2)
2020-12-06 14:09:35 +01:00

15 lines
247 B
Python

lines = (set(x.strip()) for x in open("input.txt"))
current = set()
count = 0
for line in lines:
if len(line) == 0:
count += len(current)
current = set()
current = current.union(line)
count += len(current)
print(count)