remove from group script ?

is there a script to help remove from all group for selected objects ?

in tried that in viewport and it does not work in 2.79 !

happy bl

I found this code snippet

# grouped objects

print("grouped objects are these")
for i in bpy.context.selectable_objects:
	if  in names_of_grouped_objects:
		print(">>>",[].select = True

at least I can list which one are part of a group

but how to remove from all groups ?

happy bl