aoc2020/6/1.py

14 lines
270 B
Python
Raw Normal View History

2020-12-09 09:26:04 +01:00
entry = set()
total = 0
with open("input") as f:
for line in f:
line = line.strip()
if not line:
total += len(entry)
entry = set()
else:
entry = set(line) | set(entry)
total += len(entry)
print(total)