# How do you specify the name of a new vertex group?

Pretty simple question, it's pretty easy to create a new vertex group using bpy.ops.object.vertex_group_add(), but I can't find any way to specify the name of this new group without editing it in the Properties menu. Maybe I'm blind, but it just doesn't seem to be obvious to me.

You can use obj.vertex_groups.new(name="mygroup") instead where you can specify the name while creating the group.
if you need to use bpy.ops.object.vertex_group_add() and want to specify the name after that you can also set it as follows : obj.vertex_groups[-1].name="mygroup"