17 lines
346 B
Python
17 lines
346 B
Python
#!/usr/bin/env python
|
|
|
|
import string
|
|
|
|
ans_yes = 0
|
|
with open("input01.txt","r") as f:
|
|
answers = set(string.ascii_lowercase)
|
|
for line in f:
|
|
line = line.strip()
|
|
if len(line) == 0:
|
|
ans_yes += len(answers)
|
|
answers = set(string.ascii_lowercase)
|
|
continue
|
|
answers = answers.intersection(set(line))
|
|
|
|
ans_yes += len(answers)
|
|
print(ans_yes) |