Update 11. 序列.md

This commit is contained in:
LSGOMYP
2020-07-21 12:52:55 +08:00
parent ed7b613e0f
commit 3e6ef35ea0

View File

@@ -1,6 +1,8 @@
# 序列
在 Python 中,序列类型包括字符串、列表、元组、集合和字典,这些序列支持一些通用的操作,但比较特殊的是,集合和字典不支持索引、切片、相加和相乘操作。
## 1. 针对序列的内置函数
@@ -155,6 +157,10 @@ print(b)
for i, element in a:
print('{0},{1}'.format(i, element))
# 0,Spring
# 1,Summer
# 2,Fall
# 3,Winter
```
- `zip(iter1 [,iter2 [...]])`