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