python中 元组

#元组,不可变的list,一旦定义好就不可被改变,一般会用于连接数据库信息等;
#他也是通过下标访问的
#定义一个空的元组
a=()
t=('127.0.0.0',3306,'root','123456')
t.count(3306)#某个元素出现的次数
t.index(3306)#找某个元素的下标
原文地址:https://www.cnblogs.com/mzxs-jgm/p/10738723.html