Multi property change in python

I search for example of scripts to change different settings in a selection of objects.
Some stuff is a bit tricky in Blender. For example I wanted to remove specific named Uv Maps in a selection of objects. It looks like you need to cycle through these individual to get the names, etc.
Any samples would be helpful. Its mostly about reseting and renaming object properties.

Something like this pseudo-code wouldn’t work?

for obj in bpy.context.selected_objects:
    if hasattr(obj.propertypath, "property"):
        delete obj.propertypath.property

yeah, do not seem to be so easy. I need more samples to learn it.

For example I tried:

import bpy
for obj in bpy.context.selected_objects :
obj.hide_viewport = False

No error, but also not working
Then:

import bpy

for obj in bpy.context.selected_objects:

if hasattr(obj.propertypath, "hide_viewport"):

    delete obj.propertypath.hide_viewport

Still not working…

I used pseudocode, it is expected to not work :wink:
in your first code snippet there’s an indentation error.
Pay attention to what system console returns as error

Yeah, that was do to copy paste (didn’t used tab). … I did also copy the wrong code of your snippet…
The thing I just don’t get why these simple lines do not work:

import bpy

for obj in bpy.context.selected_objects:
obj.hide_viewport = False

It should. Consider that if you want to hide, it has to be:

obj.hide_viewport = True