Python 交错合并多个list列表的方法及示例代码
示例代码:
l1 = ["a","b","c","d"]
l2 = [1,2,3,4]
l3 = ["w","x","y","z"]
l4 = [5,6,7,8]
实现效果:
l5 = ["a",1,"w",5,"b",2,"x",6,"c",3,"y",7,"d",4,"z",8]
1、直接使用"+"号合并列表
l5 = l1 + l2 + l3 + l4
2、使用extend方法
l5 = l1.extend(l2,l3,l4,l5)
3、使