From d854211695c76ebfd7d48955520faff956a1152d Mon Sep 17 00:00:00 2001 From: anyin233 Date: Mon, 15 Jun 2020 10:19:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=AC=AC=E4=BA=8C=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- set_use.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 set_use.py 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