<qiyuangong>665_Non-decreasing_Array_1.py
def checkPossibility( nums):
    pos = None
    
    
    for i in range(len(nums) - 1):
        if nums[i] > nums[i + 1]:
            if pos is not None:
                return False
            pos = i
    if pos is None or pos == 0 or pos == len(nums) - 2:
        return True
    
    return (nums[pos - 1] <= nums[pos + 1] or nums[pos] <= nums[pos + 2])
def sample_funcname ( var_0 ) :
    var_2 = None
    for var_6 in range ( len ( var_0 ) - 1 ) :
        if var_0 [ var_6 ] > var_0 [ var_6 + 1 ] :
            if var_2 is not None :
                return False
            var_2 = var_6
    if var_2 is None or var_2 == 0 or var_2 == len ( var_0 ) - 2 :
        return True
    return ( var_0 [ var_2 - 1 ] <= var_0 [ var_2 + 1 ] or var_0 [ var_2 ] <= var_0 [ var_2 + 2 ] )
