<doocs>2319.Check if Matrix Is X-Matrix_1.py
def checkXMatrix( grid: List[List[int]]) -> bool:
    n = len(grid)
    for i, row in enumerate(grid):
        for j, v in enumerate(row):
            if i == j or i == n - j - 1:
                if v == 0:
                    return False
            elif v:
                return False
    return True
def sample_funcname ( var_0 : List [ List [ int ] ] ) -> bool :
    var_5 = len ( var_0 )
    for var_7 , var_8 in enumerate ( var_0 ) :
        for var_9 , var_10 in enumerate ( var_8 ) :
            if var_7 == var_9 or var_7 == var_5 - var_9 - 1 :
                if var_10 == 0 :
                    return False
            elif var_10 :
                return False
    return True
