From 22413c844b73b8a34373352ce6c7751678a3ff21 Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 4 Dec 2022 14:34:47 +0100 Subject: [PATCH] add function comment --- 4/cleanup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/4/cleanup.py b/4/cleanup.py index d091b9e..acb0b64 100644 --- a/4/cleanup.py +++ b/4/cleanup.py @@ -3,6 +3,9 @@ from aocd import submit def find_overlaps(sets: list) -> int: + """ + count the number of sets that overlap + """ overlaps = [1 if set.intersection(*pair) else 0 for pair in sets] return sum(overlaps)