I know this question has accepted answer already but wanted to add how to create a hole on one vector layer from another vector layer with python using the osgeo.ogr library/Bindings.
You have two layers and w
ant to create a hole in one of the layers(assuming layer1 and layer2).
The Clip method returns a layer that has attribute from both layers which is not what you want.
#create empty result layer
ogrGeometryType = ogr.Geometry(ogr.wkbPolygon)
outDs = driver.CreateDataSource('clip2_test.shp')
outLayer = outDs.CreateLayer('clip2_test.shp', geom_type=ogrGeometryType)
Instead, use Erase method that takes the same arguments but creates a hole and returns a layer with a hole.
To create a hole in layer1 using layer2.