human
Write a python function to check whether the given array is monotonic or not. Here is a solution in Python: ... Write me a the Python code you requested?
assistant
#Here is the Python code you requested.
 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)))