Grouping Question

I have a file that contains multiple groups within the scene. Each group has multilple objects within it. I am exporting object data to an external program through python by writing a simple text file.
I am wanting to print out the group for each object to this file. How can i do that?
I know that you can access all of the objects within the scene by using :

objects = Blender.Object.Get()
for obj in objects:
     do whatever you want in here for object data

and you can access all of the groups within the scene by using:

groups = Blender.Group.Get()

How can i utilize these togther or just get the group data for each object in general?


ob_groups = dict([(, []) for ob in Blender.Object.Get() ])
for group in Blender.Group.Get():
    for ob in group.objects:
# did this work
for ob in Blender.Object.Get():
    print ob_groups[]