Python 元组

元组

元组是有序且不可更改的集合。在 Python 中,元组使用圆括号编写。

实例

创建一个元组:

thistuple = ("apple", "banana", "cherry")
print(thistuple)

亲自试一试