Skip to content

Instantly share code, notes, and snippets.

View cmitides89's full-sized avatar

Constantin cmitides89

  • New York
View GitHub Profile
@cmitides89
cmitides89 / monotonic.py
Created July 22, 2019 20:19 — forked from M-Bryant/monotonic.py
Set of python functions for checking list of number increasing
def strictly_increasing(L):
"""Returns TRUE if the values in the list are strictly increasing
Always increasing; never remaining constant or decreasing or null.
"""
return all(x<y for x, y in zip(L, L[1:]))
def strictly_decreasing(L):
"""Returns TRUE if the values in the list are strictly decreasing
Always decreasing; never remaining constant or increasing or null.