"""Helpers for Lists.""" from typing import List def have_common_elements(first: List, second: List) -> bool: """Check if the lists have any elements in common.""" if not first or not second: return False first_set = set(first) second_set = set(second) return bool(first_set.intersection(second_set))