0
0
Fork 0

Add code for 2020 day 6.

This commit is contained in:
Oliver-Akins 2020-12-06 21:44:06 -07:00
parent 54601c8efa
commit 90d1031207
3 changed files with 36 additions and 0 deletions

16
day_6/part_1.py Normal file
View file

@ -0,0 +1,16 @@
with open("data") as f:
plane = f.read()
plane = plane.split("\n\n")
count = 0
for group in plane:
group_answers = []
for person in group.split("\n"):
for q in person:
if q not in group_answers:
group_answers.append(q)
count += len(group_answers)
print(count)