How to get vertex groups list?

Hello,

In

bpy.data.meshes[0].vertices

It have group and weight value.
But I can not find groups list data, where is it?

Online Python Reference’s link is

bpy.types.VertexGroups

I think it may be a groups list, How to access it?
I am a newbie, only use bpy.data to access.

Thanks,

Vertex groups are attached to the object.


obj = bpy.data.objects['myObject'] #get your object
vGroups = obj.vertex_groups #get the vertex groups for your object