python之flatten操作 例如:li=[[1,2],[3,4],[5,6]]print [j for i in li for j in i]#orfrom itertools import chainprint list(chain(*li))#ora=[[1,2],[3,4],[5,6]]t=[][t.extend(i) for i in a]print t#or... python 2024-01-06 35 点赞 0 评论 53 浏览