Python:将两个不同长度的整数列表一起添加为一个列表
我拥有的:
first = [1,2,3]
second = [1,2,3,4]
我想要的:
third = [2,4,6,4]
第一个 +秒=第三=
我尝试使用numpy和zips,但是在最小列表完成后它们都停止。
What I have:
first = [1,2,3]
second = [1,2,3,4]
What I want:
third = [2,4,6,4]
first + second = third
I've tryed using numpy and zips but they all stop after the smallest list is complete.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这里希望你喜欢
Here hope you like it