summaryrefslogtreecommitdiff
path: root/progs/a431.py
blob: 9a8a7de2a0fc4d55be1bff3d772c0bc5430ac426 (plain)
1
2
3
def is_Monotonic(A): 
    return (all(A[i] <= A[i + 1] for i in range(len(A) - 1)) or
            all(A[i] >= A[i + 1] for i in range(len(A) - 1)))