input: 
  def removeItem(list, item):
      """ Remove all occurrences of an item from a list.
      >>> removeItem([1, 2, 3, 4, 2, 5, 2], 2)
      [1, 3, 4, 5]
      >>> removeItem([1, 2, 3, 2, 4, 2, 5], 2)
      [1, 3, 4, 5]
      >>> removeItem([1, 3, 4, 5], 2)
      [1, 3, 4, 5]
      """
      for i in list:
          if i == item:
              list.remove(i)
      return list
  
output:     while item in list:
          list.remove(item)
      return list