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 :
Easier method discovered by a newbie: click on "Weight" (directly beneath, where you would change the default value away from 1.000) and then press tab to scroll through the names of the vertex groups and change them accordingly. I think this is a bug. There's a similar workaround for the name of particle groups in the Active Particle System Index: click in the reusable name slot beneath (above "Emitter"/"Hair" buttons) and then tab through the index.