input: Write a python function to remove consecutive duplicate elements in a list.
  assert remove_duplicates([1, 1, 2, 3, 3, 4, 4, 4, 5]) == [1, 2, 3, 4, 5]
  assert remove_duplicates([4, 4, 4, 4, 4, 4]) == [4]
  assert remove_duplicates([1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 6]) == [1, 2, 3, 4, 5, 6]
output: def remove_duplicates(lst):
      if not lst:
          return []
      result = [lst[0]]
      for i in range(1, len(lst)):
          if lst[i] != lst[i - 1]:
              result.append(lst[i])
      return result