列表的使用
从0开始计算,names[0] = "ZhangSan"
names = ["ZhangSan","LiSi",["ZhaoQian,SunSan"],"WangWu"]
names.append("ZhaoLiu") #在列表最后增加
names = ["ZhangSan","LiSi",["ZhaoQian,SunSan"],"WangWu"] names.insert(3,"赵谦") print(names) #结果 [‘ZhangSan‘, ‘LiSi‘, [‘ZhaoQian,SunSan‘], ‘赵谦‘, ‘WangWu‘]
原文:http://www.cnblogs.com/cheng662540/p/7912631.html