18 lines
665 B
Markdown
18 lines
665 B
Markdown
---
|
||
title: The Python Data Structures
|
||
localeTitle: Python数据结构
|
||
---
|
||
数据结构是在计算机中组织数据的特定方式,以便可以有效地使用它。 Python带有一组强大的内置数据结构。一些最常用的是: -
|
||
|
||
* 清单
|
||
* 元组
|
||
* 字典
|
||
|
||
主要是,数据结构可分为两类: -
|
||
|
||
* 可变: - 可变数据结构是一种结构,其状态可在创建后进行修改。 Python列表和字典是可变的。
|
||
* 不可变: - 不可修改不可变数据结构。示例: - 创建元组后,我们无法更新其中的值。
|
||
|
||
## 参考:
|
||
|
||
[Python数据结构](https://docs.python.org/3.7/tutorial/datastructures.html) |