>>> hoge= [[1,2,3],[4,5,6],[7,8,9]] >>> zip(hoge) [([1, 2, 3],), ([4, 5, 6],), ([7, 8, 9],)] >>> zip(*hoge) [(1, 4, 7), (2, 5, 8), (3, 6, 9)]
牌語備忘録 -pygo
>>> hoge= [[1,2,3],[4,5,6],[7,8,9]] >>> zip(hoge) [([1, 2, 3],), ([4, 5, 6],), ([7, 8, 9],)] >>> zip(*hoge) [(1, 4, 7), (2, 5, 8), (3, 6, 9)]