def list_intersection(list1: list, list2: list) -> list:
return list(set(list1).intersection(set(list2)))
def list_union(list1: list, list2: list) -> list:
return list(set(list1).union(set(list2)))
def list_difference(in_list: list, not_in_list: list) -> list:
return list(set(in_list).difference(set(not_in_list)))
if __name__ == '__main__':
list_1 = ['a', 'b', 'c', 1, 2, 3]
list_2 = [1, 2, 3, 4, 5, 6]
print("交集:", list_intersection(list_1, list_2))
print('并集:', list_union(list_1, list_2))
print('差集(在list_1中,但不在list_2中):', list_difference(list_1, list_2))