input: Write a function to remove all the occurrences of an item from a given list. The function should take two parameters: the list and the item to remove. If the item is found in the list, it should be removed from the list. The function should then return the modified list.
  
  def removeItem(list, item):
      # loop through the list
      for i in list:
          # check if the element is the item to remove
          if i == item:
              # remove the item
              list.remove(i)
      # return the list
      return list
  
  assert removeItem([1, 2, 3, 4, 2, 5, 2], 2) == [1, 3, 4, 5]
  assert removeItem([1, 2, 3, 2, 2, 4], 2) == [1, 3, 4]
  assert removeItem([], 5) == []
  assert removeItem([3, 3, 3, 3], 3) == []
  assert removeItem([1, 2, 3, 4, 5], 6) == [1, 2, 3, 4, 5]
output: def removeItem(list, item):
      return [i for i in list if i != item]