小编Yi *_*ong的帖子

如何在多个 Python 列表的元素之间插入元素?

假设我有多个 Python 列表。在多个 Python 列表的元素之间插入元素的一种快速方法是什么?

# Have
list1 = [1, 2, 3]
list2 = [10, 11, 12]
list3 = [20, 21, 22]

# Expect
list_between = [1, 10, 20, 2, 11, 21, 3, 12, 22]
Run Code Online (Sandbox Code Playgroud)

python list insert

1
推荐指数
1
解决办法
153
查看次数

标签 统计

insert ×1

list ×1

python ×1