input: Write a python function to check if a list is in ascending or descending order.
  assert check_order([1, 2, 3, 4, 5]) == 'ascending'
  assert check_order([5, 4, 3, 2, 1]) == 'descending'
  assert check_order([1, 3, 2, 4, 5]) == 'not ordered'
  assert check_order([10, 9, 8, 8, 7]) == 'not ordered'
  assert check_order([7]) == 'ascending'
output: def check_order(lst):
      if all(lst[i] <= lst[i + 1] for i in range(len(lst) - 1)):
          return 'ascending'
      elif all(lst[i] >= lst[i + 1] for i in range(len(lst) - 1)):
          return 'descending'
      else:
          return 'not ordered'