You could convert them to to sets and use the bitwise operator/logical(&
) to effectively combine to 2 lists and meet your criteria.
def find_common_elements(list1 :list, list2:list):
set1 = set(list1)
set2 = set(list2)
return list(set1 & set2)