From 153cae4cb4baa9cae857c75db9fc629a9ce81fa1 Mon Sep 17 00:00:00 2001 From: ZhaolongLi <0x4f4f4f4f@gmail.com> Date: Mon, 19 Apr 2021 20:08:43 +0800 Subject: [PATCH] Update python_base.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 符号从中文改为英文 --- python_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_base.py b/python_base.py index 9b5e605..4368b47 100644 --- a/python_base.py +++ b/python_base.py @@ -83,7 +83,7 @@ t = set("Hello") # 创建一个字符的集合,返回{'l', 'H', 'e', 'o'} a = t | s; t.union(s) # t 和 s的并集 b = t & s; t.intersection(s) # t 和 s的交集 - c = t – s; t.difference(s) # 求差集(项在t中, 但不在s中) + c = t - s; t.difference(s) # 求差集(项在t中, 但不在s中) d = t ^ s; t.symmetric_difference(s) # 对称差集(项在t或s中, 但不会同时出现在二者中) t.add('x'); t.remove('H') # 增加/删除一个item s.update([10,37,42]) # 利用[......]更新s集合