📜  python 将对象插入列表 - Python 代码示例

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

代码示例1
# list.insert(before, value)
list = ["a", "b"]
list.insert(1, "c")
print(list)         # ['a', 'c', 'b']
# at the end: list.append(value)
list.append("d")    # ['a', 'c', 'b', 'd']