comefrom: <doocs>2352.Equal Row and Column Pairs_1.py
code: def equalPairs( grid: List[List[int]]) -> int:
      n = len(grid)
      g = []
      for j in range(n):
          t = []
          for i in range(n):
              t.append(grid[i][j])
          g.append(t)
      return sum(row == col for row in grid for col in g)
masked: def sample_funcname ( var_0 : List [ List [ int ] ] ) -> int :
      var_1 = len ( var_0 )
      var_2 = [ ]
      for var_3 in range ( var_1 ) :
          var_4 = [ ]
          for var_5 in range ( var_1 ) :
              var_4.append ( var_0 [ var_5 ] [ var_3 ] )
          var_2.append ( var_4 )
      return sum ( var_6 == var_7 for var_6 in var_0 for var_7 in var_2 )
  