首页 > 解决方案 > 如何在另一个列表中的项目之间插入列表中的项目?

问题描述

我有两个清单:

list1=[1,2,3]
list2=[0,0]

我将如何对其进行编码,使其看起来像这样:

list1=[1,0,2,0,3]

我知道它涉及循环,我有这样的想法,但它不起作用

for items in zero:
   for position in list1:

标签: pythonlist

解决方案


推荐阅读