Need help with bmesh script

I am trying to copy the rotation of a circle in edit mode to match another circle’s rotation that is in object mode. But the first circle must stay in edit mode. Can this be done? I’m not sure if I put this together well.

circle_a =['CircleA']

circle_b =['CircleB']

bm = bmesh.from_edit_mesh(

selected_verts = [v for v in bm.verts if]
for vert in selected_verts: = circle_b.matrix_world

This can’t work, .co (location) are vectors, you can’t set it to be a matrix.

I always struggle with these kind of issues, but maybe you should show the problem better…
Does the two circles have the same vert count ? If that the case , something that may work :

You find the center of both circles
You calculate the offset of the two circles by substracting their centers
You put all the vertices of Edit_circle in place of Ob_Circle’s verts
Then you offset all the vertices of Edit_Circles by the distance calculated earlier.

Another way is to first calculate the rotation of the circle in edit mode, then get the rotation of the other circle and calculate the difference.

You can find the center of the circle by getting the center of two opposite points, then from that calculate the orientation of the circle by using Cross Product, Dot Product operations. I’m not much familiar with these operations, I can’t tell you the exact steps without looking more into it.