파이썬에서 집합(Set)의 교집합은 두 집합 사이의 공통된 요소들로 이루어진 새로운 집합을 생성하는 연산입니다. 교집합은 두 가지 방식으로 수행할 수 있습니다: 연산자(&)를 사용하거나 intersection() 메서드를 호출합니다. 1. 연산자(&)를 사용한 교집합 set1 = {1, 2, 3, 4, 5} set2 = {3, 4, 5, 6, 7} intersection_set = set1 & set2 # 또는 intersection_set = set1.intersection(set2) print(intersection_set) # 결과: {3, 4, 5} 2. intersection() 메서드를 사용한 교집합 set1 = {1, 2, 3, 4, 5} set2 = {3, 4, 5, 6, 7} inters..