Tuple(元组) 与列表类似,不同之处在于元组的 ##元素不能修改##
python开发中,有特定的应用场景,逗号分隔()小括号定义0开始
info_tuple = ("zhangsan", 18 ,1.75)
print(info_tuple[1])
18
empty_tuple = ()
print(type(empty_tuple))
<class ‘tuple‘>
single_tuple = (9,)
print(type(single_tuple))
<class ‘tuple‘>

ipython3中定义一个元组,例如:info = ()info.按下TAB键,ipython会提示 元组能够使用的函数如下:
info.count
info.index
原文:https://www.cnblogs.com/xiaoqshuo/p/9449140.html