标签: python list python-2.7
如何通过交替使用元素来组合两个列表。例如:给定两个列表[' a'' b',' c']和[1,2,3,4],该函数应返回[a,1,b,2,c,3,4]
答案 0 :(得分:0)
a = [1, 2, 3, 4] b = ['a','b','c'] result = [item for sublist in zip(a,b) for item in sublist] print result