标签: python list list-comprehension
我想直接从列表理解中返回一个包含两个列表的交错元素的列表-无需使用下一步来使结果变平。有可能吗?
alist1_temp=[1, [4,2]] alist2_temp=[3, [7,4]] t=[[x,y] for x,y in zip(alist1_temp, alist2_temp)]
返回 [[1,3],[4,7],[2,4]]
但是我怎么能得到 [1、3、4、7、2、4]?