<qiyuangong>036_Valid Sudoku_2.py
def isValidSudoku( board):
    if board is None:
        return True
    for i in range(9):
        table = {}
        for j in range(9):
            curr = board[i][j]
            if curr == '.':
                continue
            else:
                try:
                    table[curr] += 1
                    return False
                except KeyError:
                    table[curr] = 1
    for j in range(9):
        table = {}
        for i in range(9):
            curr = board[i][j]
            if curr == '.':
                continue
            else:
                try:
                    table[curr] += 1
                    return False
                except KeyError:
                    table[curr] = 1
    for i in range(3):
        for j in range(3):
            table = {}
            for k in range(9):
                curr = board[i * 3 + k / 3][j * 3 + k % 3]
                if curr == '.':
                    continue
                else:
                    try:
                        table[curr] += 1
                        return False
                    except KeyError:
                        table[curr] = 1
    return True
def sample_funcname ( var_0 ) :
    if var_0 is None :
        return True
    for var_5 in range ( 9 ) :
        var_6 = { }
        for var_7 in range ( 9 ) :
            var_8 = var_0 [ var_5 ] [ var_7 ]
            if var_8 == '.' :
                continue
            else :
                try :
                    var_6 [ var_8 ] += 1
                    return False
                except KeyError :
                    var_6 [ var_8 ] = 1
    for var_7 in range ( 9 ) :
        var_6 = { }
        for var_5 in range ( 9 ) :
            var_8 = var_0 [ var_5 ] [ var_7 ]
            if var_8 == '.' :
                continue
            else :
                try :
                    var_6 [ var_8 ] += 1
                    return False
                except KeyError :
                    var_6 [ var_8 ] = 1
    for var_5 in range ( 3 ) :
        for var_7 in range ( 3 ) :
            var_6 = { }
            for var_14 in range ( 9 ) :
                var_8 = var_0 [ var_5 * 3 + var_14 / 3 ] [ var_7 * 3 + var_14 % 3 ]
                if var_8 == '.' :
                    continue
                else :
                    try :
                        var_6 [ var_8 ] += 1
                        return False
                    except KeyError :
                        var_6 [ var_8 ] = 1
    return True
