<doocs>0896.Monotonic Array_1.py
def isMonotonic( nums: List[int]) -> bool:
    isIncr = isDecr = False
    for i, v in enumerate(nums[1:]):
        if v < nums[i]:
            isIncr = True
        elif v > nums[i]:
            isDecr = True
        if isIncr and isDecr:
            return False
    return True
def sample_funcname ( var_0 : List [ int ] ) -> bool :
    var_6 = var_4 = False
    for var_8 , var_10 in enumerate ( var_0 [ 1 : ] ) :
        if var_10 < var_0 [ var_8 ] :
            var_6 = True
        elif var_10 > var_0 [ var_8 ] :
            var_4 = True
        if var_6 and var_4 :
            return False
    return True
