增
1.insert
A = ['','','','','','']
A.insert(0,0)
print A
2.append
A = ['','','','','','']
A.append(7)
print A
3.extend
A = ['','','','','','']
B = ['a','b','c']
A.extend(B)
print A
删
1.pop
A = ['','','','','','']
A.pop()
print A
2.remove
A = ['','','','','','']
A.remove('')
print A
3.del
A = ['','','','','','']
del A[0]
print A
改
A = ['1','2','3','4','5','6']
A[0]=0
print A
查
in
A = ['','','','','','']
for temp in A:
print temp
A = ['','','','','','']
if '' in A:
print '确实在'
not in
A = ['','','','','','']
if '' not in A:
print '确实不在'
index:返回查找元素的下标
A = ['','','','','','']
print A.index('')
count:返回查找元素的个数
A = ['','','','','','']
print A.count('')
列表嵌套
A = ['','','','','','',['','',''],['','','']]
for item in A:
print item
元组
A = ('','','','','','')
元组不能修改