python - 如何在另一个列表中的项目之间插入列表中的项目?
问题描述
我有两个清单:
list1=[1,2,3]
list2=[0,0]
我将如何对其进行编码,使其看起来像这样:
list1=[1,0,2,0,3]
我知道它涉及循环,我有这样的想法,但它不起作用
for items in zero:
for position in list1:
解决方案
推荐阅读
- python - 如何使用 Javascript AWS CDK 部署 Python AWS Lambda 及其依赖项?
- excel - 根据第 1 列中的查找结果返回第 2 列中的范围
- html - 将鼠标悬停在图像上时如何更改 SVG 的颜色?
- api - 是否有 ThinQ 的“开放”实施 - 即独立于 LG 网站上的注册?
- python - 将代理与 PyPaperBot 模块一起使用时出错
- lombok - 使用 @AllArgsConstructor 注释的类的对象
- python - “RuntimeError: <_overlapped.Overlapped object> 在释放时仍有待处理的操作”同时使用 aiohttp
- javascript - Discord JS - DiscordAPIError:缺少访问权限
- sed - 使用 sed 将 ' 字符替换为 \'
- github - 为什么协作者的拉取请求上没有运行操作/工作流程?