Files
python-aoc-2020/day06/part1.py
Sebastian Seedorf 223c4d87d8 Day 6 (cleanup)
2020-12-06 14:06:15 +01:00

15 lines
260 B
Python

lines = (set([c for c in 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)