finding the angle between edges in a mesh using python

hello there,

i make a a two vertex group in each one the selected vertices are in the same line i wanna to do these :

initially i wanna find those edges that connect the verices in each vertex gropu where the result is two list of edges , then i want to select each edge a highlight them then find the angle between them

since the selected edges will form to crossed line in a mesh

so is there any way using python to find it ?

thanks in advance …

me is your mesh data eg.
E0 is your first edge eg. me.edges[n]
E1 is your other edge

from mathutils import Vector

###find the vector representation of each edge
#first get the indices of the vertices which represent the edge
v00 = E0.vertices[0]
v01 = E0.vertices[1]

v10 = E1.vertices[0]
v11 = E1.vertices[1]
#now get the coordinates of those vertices and make a vector from them
V0 = Vector(me.vertices[v00].co) - Vector(me.vertices[v01].co)
V1 = Vector(me.vertices[v10].co) - Vector(me.vertices[v11].co)

###find the angle between them