import bpy
import bmesh
#切换到编辑模式下
bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.mesh.select_mode(type= 'FACE')
#bpy.ops.mesh.select_all( action = 'SELECT' )
#bpy.ops.mesh.extrude_region_move(TRANSFORM_OT_translate={"value":(0,0,5)} )
# Get the active mesh
obj = bpy.context.edit_object
me = obj.data
# Get a BMesh representation
bm = bmesh.from_edit_mesh(me)
faces = bm.faces
face = faces[0]
face.select = True
print(face )
bpy.ops.mesh.delete(type='ONLY_FACE')