📌  相关文章
📜  在列表python中插入一个元素 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:15.286000             🧑  作者: Mango

代码示例4
>>> a = [1, 2, 4]
>>> print a
[1, 2, 4]

>>> print a.insert(2, 3)
None

>>> print a
[1, 2, 3, 4]

>>> b = a.insert(3, 6)
>>> print b
None

>>> print a
[1, 2, 3, 6, 4]