You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4 lines
171 B
4 lines
171 B
5 years ago
|
setA = set('asdfghjkl')
|
||
|
setB = set('qweasdzxc')
|
||
|
|
||
|
print("交集为 {}\n并集为 {}\n差集为 {}".format(setA.intersection(setB), setA.union(setB), setA.difference(setB)))
|