summaryrefslogtreecommitdiff
path: root/progs/a431.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a431.py')
-rw-r--r--progs/a431.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/progs/a431.py b/progs/a431.py
new file mode 100644
index 0000000..9a8a7de
--- /dev/null
+++ b/progs/a431.py
@@ -0,0 +1,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))) \ No newline at end of file