标签:作用 最小 code tuple 合并 table lang enumerate tar
| 运算符 | 描述 | 支持的容器类型 |
|---|---|---|
| + | 合并 | 字符串、列表、元组 |
| * | 复制 | 字符串、列表、元组 |
| in | 元素是否存在 | 字符串、列表、元组、字典 |
| not in | 元素是否不存在 | 字符串、列表、元组、字典 |
| 函数 | 描述 |
|---|---|
| len() | 计算容器中元素个数 |
| del 或 del() | 删除 |
| max() | 返回容器中元素最大值 |
| min() | 返回容器中元素最小值 |
| range(start, end, step) | 生成从start到end的数字,步长为 step,供for循环使用 |
| enumerate() | 函数用于将一个可遍历的数据对象(如列表、元组或字符串)组合为一个索引序列,同时列出数据和数据下标,一般用在 for 循环当中。 |
enumerate(可遍历对象, start=0)
标签:作用 最小 code tuple 合并 table lang enumerate tar
原文地址:https://www.cnblogs.com/xswh/p/12775815.html