Python 列表

列表

列表是有序且可更改的集合。

在 Python 中,列表是用方括号编写的。

实例

创建一个列表:

thislist = ["apple", "banana", "cherry"]
print(thislist)

亲自试一试