Removing all vertex color from all/one selected objects

What i need: i want to make a script which will remove all vertex color data in both cases:
several selected objects with several vertex color data
or only one selected object (which also can contain multiple Col.).

Im trying this script:

import bpy

for obj in bpy.context.selected_objects:
    for col_attr in

But it cases when some object have something like:

Script can throw an error in some cases:
Traceback (most recent call last):
File “\Text.001”, line 5, in
RuntimeError: Error: Vertex color ‘NGon Face-Vertex’ not found

You’re removing items from a dictionary while iterating over it. use vertex_colors.items() instead

1 Like

Can you show some examples with vertex_colors.items()? :face_with_monocle:

Okay i find the answer:

import bpy

for o in bpy.context.selected_objects:
if o.type != ‘MESH’:

for k,v in