add function comment

This commit is contained in:
aaron
2022-12-04 14:34:47 +01:00
parent 5a5f94d557
commit 22413c844b

View File

@@ -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)