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]
      """
      for i in list[:]:  # Use slicing to avoid modifying list while iterating.
          if i == item:
              list.remove(i)
      return list
output:     for i in list[:]:  # Use slicing to avoid modifying list while iterating.
          if i == item:
              list.remove(i)
      return list