python的列表使用
创建一个标题
list1 = ['a','b','c',4,5,6]
列表中增加元素
list1.append(8)
list1
['a', 'b', 'c', 4, 5, 6, 8]
list1.insert(1,'f')
list1
['a', 'f', 'b', 'c', 4, 5, 6, 8]
列表中修改元素(1)
list1.pop(0)
print(list1)
['f', 'b', 'c', 4, 5, 6, 8]
list1.insert(0,'hellow world')
p
原创
2020-11-05 10:03:17 ·
141 阅读 ·
0 评论