小编But*_*iks的帖子

如何在Python中交错两个列表中的元素

list1 = ["a", "b", "c"]
list2 = [1, 2, 3]

list3 = list1 + list2
print(list3)

output ---

['a', 'b', 'c', 1, 2, 3]
Run Code Online (Sandbox Code Playgroud)

但我想要这样的输出 ---

['a',1,'b',2,'c',3]
Run Code Online (Sandbox Code Playgroud)

请帮我

python datetime list

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

标签 统计

datetime ×1

list ×1

python ×1