首页 > TAG信息列表 > thistuple

Python 元组

7.Python 元组 7.1 创建元组 元组(Tuple) 元组是有序且不可更改的集合。在 Python 中,元组是用圆括号编写的。 实例 创建元组: thistuple = ("apple", "banana", "cherry") print(thistuple) 运行结果: ('apple', 'banana', 'cherry') 也可以用tuple() 构造函数创建元组