input: Write a python function to check if a list is sorted.
  assert is_sorted([1, 2, 3, 4]) == True
  assert is_sorted([4, 3, 2, 1]) == False
  assert is_sorted([1, 2, 2, 3]) == True
  assert is_sorted([1, 3, 2, 4]) == False
output: def is_sorted(lst):
      return all(lst[i] <= lst[i + 1] for i in range(len(lst) - 1))