@@ -0,0 +1,479 @@
+from operator import add%0Aclass Solution(object):%0A    def matrixReshape(self, nums, r, c):%0A        %22%22%22%0A        :type nums: List%5BList%5Bint%5D%5D%0A        :type r: int%0A        :type c: int%0A        :rtype: List%5BList%5Bint%5D%5D%0A        %22%22%22%0A        if len(nums) == 0:%0A            return nums%0A        origR = len(nums)%0A        origC = len(nums%5B0%5D)%0A        if origR * origC != r * c:%0A            return nums%0A        oneline = reduce(add, nums)%0A        return map(list, zip(*(%5Biter(oneline)%5D * c)))%0A

Add py solution for 566. Reshape the Matrix