Advent-of-Code/2020/day 6/P1/custom_customs.py

11 lines
215 B
Python
Raw Permalink Normal View History

2020-12-06 12:00:45 +01:00
qs = []
with open("input.txt") as f:
for q in f.read().split("\n\n"):
s = set()
for a in q.split("\n"):
s.update(list(a))
qs.append(s)
print(sum(map(lambda x: len(x), qs)))