input: def is_monotonic(seq: list) -> bool:
      """Determine if the elements of a list are consistently increasing or decreasing.
      >>> is_monotonic([1, 2, 4, 20])
      True
      >>> is_monotonic([1, 20, 4, 10])
      False
      >>> is_monotonic([4, 1, 0, -10])
      True
      """
output:     increasing = decreasing = True
      for i in range(1, len(seq)):
          if seq[i] > seq[i - 1]:
              decreasing = False
          if seq[i] < seq[i - 1]:
              increasing = False
      return increasing or decreasing