How to remove certain part of the object name for hundreds of objects? I am new to scripting and trying to find a way to remove the marketing_ prefix from a few hundred objects in one go. I can get the script below to work fine one the active objects but I cant figure out how to apply it to all objects in the scene or all selected objects.

import bpy
bpy.context.object.name = bpy.context.object.name.replace("marketing_", "")


How to do that for multiple objects? Any help is greatly appreciated.
For selected objects:

import bpy 

for o in bpy.context.selected_objects:
    o.name = o.name.replace("marketing_", "")


Or for all objects in the scene:

for o in bpy.context.scene.objects:
    o.name = o.name.replace("marketing_", "")


Or for all objects in the file:

for o in bpy.data.objects:
    ...