Vertices that have a shared face in Python
You can use bmesh to do that. BMesh offers facilities to navigate through verts/edges/faces.

So for instance:

import bpy
import bmesh

obj = bpy.context.object

bm = bmesh.new()
bm.from_mesh( obj.data )

bm.verts.ensure_lookup_table()

v1 = bm.verts[0]
v2 = bm.verts[1]
v3 = bm.verts[3]

inter = set( v1.link_faces ) &amp; set( v2.link_faces ) &amp; set( v3.link_faces )

print( inter )


ensure_lookup_table tells bmesh to prepare the data (you may want to use it too on bm.edges and bm.faces)

For more information, have a look to this documentation.