l = [[1,2],[3,4]] t= [[1,2],[3,4]] adde =[x +y for x,y in zip(l,t)] lt = [map(sum,zip(*adde)] print(lt)
我想知道这是比使用两个for循环便宜还是便宜。复杂性分解将不胜感激。谢谢`