- Just try, select four top vertices and make 'vertex group' on a cube.
- Deselect all vertices.
- Open the 'report' window.
- In a 'Vertex Group' tab, push 'Select' button, of course the four vertices of the group was selected. See the report window, I could see 'bpy.ops.object.vertex_group_select()'.
- Copy it and paste to the script window.
- Deselect all vertices again for test.
- Push 'Run Script' button.
- On the screen, four vertices were selected!
It's a very little one step for me. :-)