Let\'s take:
l = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
The result I\'m looking for is
r = [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
just for fun, valid rectangles and assuming that m[0] exists
>>> m = [[1,2,3],[4,5,6],[7,8,9]] >>> [[row[i] for row in m] for i in range(len(m[0]))] [[1, 4, 7], [2, 5, 8], [3, 6, 9]]