This commit is contained in:
Sebastian Seedorf
2020-12-06 14:00:44 +01:00
parent 110c9fd125
commit 91bfe88097
3 changed files with 2120 additions and 0 deletions

15
day06/part1.py Normal file
View File

@@ -0,0 +1,15 @@
lines = (set([c for c in x.strip()]) for x in open("input.txt"))
current = set()
count = 0
for line in lines:
if len(line) == 0:
print("x", len(current))
count += len(current)
current = set()
current = current.union(line)
count += len(current)
print(count)