There was an error while loading. Please reload this page.
1 parent 3df5ac1 commit 9c20fd8Copy full SHA for 9c20fd8
python_base.py
@@ -83,7 +83,7 @@
83
c = t – s; t.difference(s) # 求差集(项在t中, 但不在s中)
84
d = t ^ s; t.symmetric_difference(s) # 对称差集(项在t或s中, 但不会同时出现在二者中)
85
t.add('x'); t.remove('H') # 增加/删除一个item
86
- t.update([10,37,42]) # 利用[......]更新s集合
+ s.update([10,37,42]) # 利用[......]更新s集合
87
x in s, x not in s # 集合中是否存在某个值
88
s.issubset(t); s.issuperset(t); s.copy(); s.discard(x); s.clear()
89
{x**2 for x in [1, 2, 3, 4]} # 集合解析,结果:{16, 1, 4, 9}
0 commit comments