5 lines
198 B
Python
5 lines
198 B
Python
groups = open("input", "r").read().split("\n\n")
|
|
people = [[set(p) for p in g.split("\n") if p] for g in groups]
|
|
common = [set.intersection(*p) for p in people]
|
|
print(sum([len(c) for c in common]))
|