mirror of
https://github.com/jneug/adventofcode.git
synced 2026-04-14 06:43:33 +02:00
17 lines
375 B
Python
17 lines
375 B
Python
input = []
|
|
with open('day6_input.txt', 'r') as f:
|
|
group = ''
|
|
for line in f.readlines():
|
|
if len(line.strip()) == 0:
|
|
input.append(group)
|
|
group = ''
|
|
else:
|
|
group += line.strip()
|
|
input.append(group)
|
|
|
|
def counter(group):
|
|
return len(set(group))
|
|
print(sum(map(counter, input)))
|
|
|
|
print(input[0])
|
|
print(set(input[0])) |