#!/usr/bin/env python
# -*- coding:utf- -*-
# Author:Irving
list_1 = [,,,,,,,]
list_1 = set(list_1) list_2 = set([,,,,,,])
print(list_1,list_2) #交集
print( list_1.intersection(list_2)) #并集
print(list_1.union(list_2)) #差集 in list_1 but not in list_2
print(list_1.difference(list_2)) #判断子集
list_3 = set([,,])
print(list_3.issubset(list_1))
print(list_1.issuperset(list_3)) #父集 #对称差集(把互相没有的取出来)
print(list_1.symmetric_difference(list_2)) #add
list_1.add()
print(list_1) #update
list_1.update([,,])
print(list_1) print(list_1.pop())
print(list_1.pop())
print(list_1.pop())
print(list_1.pop())
print(list_1.pop()) #discard删除元素不存在不会报错,remove则会
list_1.discard()