<jupyter_start><jupyter_text>Day 6<jupyter_code>! cat README.md
with open('input.txt') as f:
    l = f.read().splitlines()
sets = list(map(lambda x: set(x) - {'_'}, '_'.join(l).split('__')))
sum(list(map(len, sets)))<jupyter_output><empty_output><jupyter_text>--- Part Two ---As you finish the last group's customs declaration, you notice that you misread one word in the instructions:You don't need to identify the questions to which anyone answered "yes"; you need to identify the questions to which everyone answered "yes"!Using the same example as above:abcabcabacaaaabThis list represents answers from five groups:In the first group, everyone (all 1 person) answered "yes" to 3 questions: a, b, and c.In the second group, there is no question to which everyone answered "yes".In the third group, everyone answered yes to only 1 question, a. Since some people did not answer "yes" to b or c, they don't count.In the fourth group, everyone answered yes to only 1 question, a.In the fifth group, everyone (all 1 person) answered "yes" to 1 question, b.In this example, the sum of these counts is 3 + 0 + 1 + 1 + 1 = 6.For each group, count the number of questions to which everyone answered "yes". What is the sum of those counts?<jupyter_code>sets = list(map(lambda x: set.intersection(*list(map(set, x.split('_')))), '_'.join(l).split('__')))
sum(list(map(len, sets)))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11626248216833096, 'fraction_numerical': 0.009272467902995721, 'mean_word_length': 5.207964601769912, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '497643', 'license': 'MIT', 'n_tokens_mistral': 434, 'n_tokens_neox': 415, 'n_words': 187, 'path': '2020/ferran/06/06.ipynb', 'repo_name': 'bbglab/adventofcode', 'size': '1402'}