Skip to content

Commit 9c20fd8

Browse files
authored
Update python_base.py
1 parent 3df5ac1 commit 9c20fd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
c = ts; t.difference(s) # 求差集(项在t中, 但不在s中)
8484
d = t ^ s; t.symmetric_difference(s) # 对称差集(项在t或s中, 但不会同时出现在二者中)
8585
t.add('x'); t.remove('H') # 增加/删除一个item
86-
t.update([10,37,42]) # 利用[......]更新s集合
86+
s.update([10,37,42]) # 利用[......]更新s集合
8787
x in s, x not in s # 集合中是否存在某个值
8888
s.issubset(t); s.issuperset(t); s.copy(); s.discard(x); s.clear()
8989
{x**2 for x in [1, 2, 3, 4]} # 集合解析,结果:{16, 1, 4, 9}

0 commit comments

Comments
 (0)