I have features in a class fc.
I want to take the list of BuildingKeys and run a query to delete those from a different feature hosted_feature:
with arcpy.da.SearchCursor(fc, [BuildingKey]) as cursor:
for row in cursor:
variable = "'" + str(row[0]) + "'"
buildingkey = "BuildingKey = "
query = buildingkey + variable
deleted = hosted_feature.delete_features(where = query)
Right now it loops through and deletes each one individually.
- If instead of looping, how would I just get the entire list of BuildingKeys and put that in the query?
- Would it be 'includes'?