This commit is contained in:
Tim Stallard 2020-12-06 12:21:23 +00:00
parent cc000459ca
commit 1f89809367

View File

@ -1,4 +1,4 @@
groups = open("input", "r").read().split("\n\n")
people = [[set(p) for p in g.split("\n") if p] for g in groups]
common = [p[0].intersection(*p) for p in people]
common = [set.intersection(*p) for p in people]
print(sum([len(c) for c in common]))