标签:type 类型 stl pre print tno for 测试 +=
#列表
namelist=["小众","小王","小李"]
print(namelist[0])
print(namelist[1])
print(namelist[2])
tastlist=[1,"测试"]#列表中可以储存混合类型
print(type(tastlist[0]))
print(type(tastlist[1]))
for name in namelist :
print(name)
print(len(namelist ))
length=len(namelist )#可以得到列表的长度
i=0
while i<length:
print(namelist[i])
i+=1
标签:type 类型 stl pre print tno for 测试 +=
原文地址:https://www.cnblogs.com/shihuiping/p/14315127.html