标签:remove 增加 print pop pen append insert int rem
a=["a","b","c","d"]
增:
append("e")在最后增加
a.insert(2,“e”)在第3个后面加 print(abced)
改:
a[1]=aa print(a aa c d)
a[0:2]=[aa,bb] print(aa bb c d)
删
remove(“a”)删除指定字符
a.pop(2)删除指定位置字符
标签:remove 增加 print pop pen append insert int rem
原文地址:https://www.cnblogs.com/penn666/p/12093796.html