day 6
This commit is contained in:
parent
8b6c82b0a2
commit
cc000459ca
3
06/1.py
Normal file
3
06/1.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
groups = open("input", "r").read().split("\n\n")
|
||||||
|
counts = [len(set(g.replace("\n", ""))) for g in groups]
|
||||||
|
print(sum(counts))
|
4
06/2.py
Normal file
4
06/2.py
Normal file
@ -0,0 +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]
|
||||||
|
print(sum([len(c) for c in common]))
|
Loading…
Reference in New Issue
Block a user