7 for line in open("input.txt", "r"):
10 all_yes="".join(questions.keys())
11 everyone_yes="".join([a for a in questions.keys() if questions[a] == people_count])
12 group_questions.append((all_yes, everyone_yes))
23 if (len(questions.keys()) > 0):
24 all_yes="".join(questions.keys())
25 everyone_yes="".join([a for a in questions.keys() if questions[a] == people_count])
26 group_questions.append((all_yes, everyone_yes))
30 for group in group_questions:
31 sum_of_groups+=len(group[0])
32 sum_of_everyone+=len(group[1])
35 print("Sum of groups: {}".format(sum_of_groups))
36 print("Sum of groups (everyone said yes): {}".format(sum_of_everyone))