python中tuple指什么
python中tuple指什么?
python中tuple指元组,Python的元组与列表类似,不同之处在于元组的元素不能修改。
元组使用小括号,列表使用方括号。
元组创建很简单,只需要在括号中添加元素,并使用逗号隔开即可。
如下实例:
实例(Python 2.0 )
tup1 = ('physics', 'chemistry', 1997, 2000) tup2 = (1, 2, 3, 4, 5 ) tup3 = "a", "b", "c", "d"
推荐学习:《Python教程》
以上就是python中tuple指什么的详细内容,更多请关注教程集其它相关文章!
您可能感兴趣的文章:
python中tuple指什么
python中的tuple是什么
python tuple什么意思
python list和tuple的区别
python tuple和list的区别是什么
python中index的用法是什么
python有什么数据类型
Python中eval有什么用
Python list()和tuple()函数用法
Python有什么数据结构