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