input: def removeItem(list, item):
      """Remove all occurrences of a specified item from a list.
      >>> removeItem([1, 2, 3, 4, 2, 5, 2], 2)
      [1, 3, 4, 5]
      """
      # 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
output:     while item in list:
          list.remove(item)
      return list