input: Write a python function to remove consecutive duplicate numbers from a list.
  assert remove_consecutive([1, 1, 2, 3, 3, 4, 4, 4, 5]) == [1, 2, 3, 4, 5]
  assert remove_consecutive([10, 10, 10, 20, 30, 30, 40]) == [10, 20, 30, 40]
  assert remove_consecutive([7, 7, 7, 7, 8, 8, 9, 9, 9]) == [7, 8, 9]
output: def remove_consecutive(lst):
      if not lst:
          return []
      result = [lst[0]]
      for num in lst[1:]:
          if num != result[-1]:
              result.append(num)
      return result