diff --git a/set_use.py b/set_use.py new file mode 100644 index 0000000..77ad08b --- /dev/null +++ b/set_use.py @@ -0,0 +1,4 @@ +setA = set('asdfghjkl') +setB = set('qweasdzxc') + +print("交集为 {}\n并集为 {}\n差集为 {}".format(setA.intersection(setB), setA.union(setB), setA.difference(setB))) \ No newline at end of file