Files
2025PY/加强.md
JYcdt f1909cd28f update README.md
更新数据容器类数据
2025-06-14 15:59:07 +08:00

30 lines
608 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 数据容器类型
创建符号:
- 列表:[1, 2, 3, 4, 5]
- 元组:(1, 2, 3, 4, 5)
- 集合:{1, 2, 3, 4, 5}
- 字典:{'key': 'value'}
### 列表list
使用[]包括,有序,可重复,下标读写
### 元组tuple
使用()包括,有序,可重复,下标可读取,不可修改
### 集合set
使用{}包括,无序,不可重复,无下标,可通过迭代读取
### 字典dict
使用{}包括,键值对[key:vlues],通过键读取
### 字符串str
在python中''或""都可以定义字符串,但建议''定义字符,""定义字符串