comefrom: <doocs>0566.Reshape the Matrix_1.py
code: def matrixReshape( nums: List[List[int]], r: int, c: int) -> List[List[int]]:
      m, n = len(nums), len(nums[0])
      if m * n != r * c:
          return nums
      res = [[0] * c for _ in range(r)]
      for x in range(m * n):
          res[x // c][x % c] = nums[x // n][x % n]
      return res
masked: def sample_funcname ( var_0 : List [ List [ int ] ] , var_3 : int , var_4 : int ) -> List [ List [ int ] ] :
      var_6 , var_8 = len ( var_0 ) , len ( var_0 [ 0 ] )
      if var_6 * var_8 != var_3 * var_4 :
          return var_0
      var_11 = [ [ 0 ] * var_4 for var_9 in range ( var_3 ) ]
      for var_12 in range ( var_6 * var_8 ) :
          var_11 [ var_12 // var_4 ] [ var_12 % var_4 ] = var_0 [ var_12 // var_8 ] [ var_12 % var_8 ]
      return var_11
  