- list[].pop(); //删除最后一个 pop(x)删除索引 x 的元素
- list[].insert ( x, 'xxx') //在索引为 x 的地方 插入 'xxx'
- tuple() 不可改变的list
- if a tuple have only one element ,you must add a ',' in the end of that element
for example :
t=(1 , )
- if x=1 :
print(x)
else :
print(y) 注意 if 判断后面 要加 : - if x=x :
elif x=1:
else :
- while x=1:
- def x(y):
Python(1)--list 和 tuple,&判断&循环
最新推荐文章于 2019-10-24 21:39:37 发布