
    Write a function to determine if a customer's sequence of transaction amounts follows a consistently increasing or decreasing pattern, which is crucial for detecting deviations from normal spending behavior. The function should analyze the transaction history and return true if all amounts are either consistently increasing or consistently decreasing, and false otherwise.
    

    
def is_Monotonic(A):
    """
    Write a function to determine if a customer's sequence of transaction amounts follows a consistently increasing or decreasing pattern, which is crucial for detecting deviations from normal spending behavior. The function should analyze the transaction history and return true if all amounts are either consistently increasing or consistently decreasing, and false otherwise.
    

    """
def is_Monotonic(A):
    """
    Write a function to determine if a customer's sequence of transaction amounts follows a consistently increasing or decreasing pattern, which is crucial for detecting deviations from normal spending behavior. The function should analyze the transaction history and return true if all amounts are either consistently increasing or consistently decreasing, and false otherwise.
    

    """
    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)))