001、
>>> set1 = {"a", "b", "c", "d"}             ## 测试集合
>>> set1
{'c', 'a', 'd', 'b'}
>>> set1.remove("d")                        ## 删除集合中的元素
>>> set1
{'c', 'a', 'b'}
>>> set1.add("x")                           ## 向集合中添加元素
>>> set1
{'x', 'c', 'b', 'a'}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/280683.html
