<doocs>2352.Equal Row and Column Pairs_1.py
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)
def sample_funcname ( var_0 : List [ List [ int ] ] ) -> int :
    var_4 = len ( var_0 )
    var_5 = [ ]
    for var_7 in range ( var_4 ) :
        var_8 = [ ]
        for var_9 in range ( var_4 ) :
            var_8.append ( var_0 [ var_9 ] [ var_7 ] )
        var_5.append ( var_8 )
    return sum ( var_12 == var_13 for var_12 in var_0 for var_13 in var_5 )
