set集合,是一个无序且不重复的元素集合
2024-10-14 07:58:35
set集合,是一个无序且不重复的元素集合
class set(object):
"""
set() -> new empty set object
set(iterable) -> new set object
Build an unordered collection of unique elements.
"""
def add(self, *args, **kwargs): # real signature unknown
"""
Add an element to a set,添加元素
This has no effect if the element is already present.
"""
pass
def clear(self, *args, **kwargs): # real signature unknown
""" Remove all elements from this set. 清除内容"""
pass
def copy(self, *args, **kwargs): # real signature unknown
""" Return a shallow copy of a set. 浅拷贝 """
pass
def difference(self, *args, **kwargs): # real signature unknown
"""
Return the difference of two or more sets as a new set. A中存在,B中不存在
(i.e. all elements that are in this set but not the others.)
"""
pass
def difference_update(self, *args, **kwargs): # real signature unknown
""" Remove all elements of another set from this set. 从当前集合中删除和B中相同的元素"""
pass
def discard(self, *args, **kwargs): # real signature unknown
"""
Remove an element from a set if it is a member.
If the element is not a member, do nothing. 移除指定元素,不存在不保错
"""
pass
def intersection(self, *args, **kwargs): # real signature unknown
"""
Return the intersection of two sets as a new set. 交集
(i.e. all elements that are in both sets.)
"""
pass
def intersection_update(self, *args, **kwargs): # real signature unknown
""" Update a set with the intersection of itself and another. 取交集并更更新到A中 """
pass
def isdisjoint(self, *args, **kwargs): # real signature unknown
""" Return True if two sets have a null intersection. 如果没有交集,返回True,否则返回False"""
pass
def issubset(self, *args, **kwargs): # real signature unknown
""" Report whether another set contains this set. 是否是子序列"""
pass
def issuperset(self, *args, **kwargs): # real signature unknown
""" Report whether this set contains another set. 是否是父序列"""
pass
def pop(self, *args, **kwargs): # real signature unknown
"""
Remove and return an arbitrary set element.
Raises KeyError if the set is empty. 移除元素
"""
pass
def remove(self, *args, **kwargs): # real signature unknown
"""
Remove an element from a set; it must be a member.
If the element is not a member, raise a KeyError. 移除指定元素,不存在保错
"""
pass
def symmetric_difference(self, *args, **kwargs): # real signature unknown
"""
Return the symmetric difference of two sets as a new set. 对称差集
(i.e. all elements that are in exactly one of the sets.)
"""
pass
def symmetric_difference_update(self, *args, **kwargs): # real signature unknown
""" Update a set with the symmetric difference of itself and another. 对称差集,并更新到a中 """
pass
def union(self, *args, **kwargs): # real signature unknown
"""
Return the union of sets as a new set. 并集
(i.e. all elements that are in either set.)
"""
pass
def update(self, *args, **kwargs): # real signature unknown
""" Update a set with the union of itself and others. 更新 """
pass
最新文章
- Asp.net web api部署在某些服务器上老是404
- Gradle系列教程之依赖管理(转)
- Wordpress制作sidebar.php
- POSIX字符类
- XAML 概述一
- C语言基础--宏
- C++ Unicode SBCS 函数对照表,以备日后查阅(很全)
- 每天一条linux命令——login
- javascript实现倒计时
- Android使用Activity用作弹出式对话框
- shiro架构
- vue-baidu-map 的简单使用
- url加时间戳方法及作用
- jsoup访问页面: PKIX path building failed
- 假如想要建设一个能承受500万PV/每天的网站,服务器每秒要处理多少个请求才能应对?
- Hadoop基础总结
- HTML学习---HTTP基础学习详解
- 20155206 《Java程序设计》实验三实验报告
- C#实现SQL数据库备份与恢复
- 谷歌强制厂商升级KitKat 仍无法改善安卓碎片化
热门文章
- java继承内部类问题(java编程思想笔记)
- 将类型(int,string,…)转换为 T 类型
- linux环境下配置java WEB项目运行环境,jdk8+tomcat8+mysql5.7.11 新手向
- require,include,require_once,include_once的区别
- 清除div中内容
- document.body.clientHeight和 document.documentElement.clientHeight 的区别
- 从Spring容器中获取Bean。ApplicationContextAware
- Unity Tidy Tile Pack #1
- html5中的beginPath与stroke
- asp.net 验证正则表达式