intersection_update()方法将仅保留两个集中重复的项。保留集合中存在的重复项"apple":x = {"apple", "banana", "cherry"}y = {"google", "microsoft", "apple"}x.intersection_update(y)print(x)执行结果:{'apple'}