How to replace meshes for every obj in a list?

I have this simple script and Ive stuck at… how to actualy change mesh for certain obj.

import bpy

list = [‘obj1’, ‘obj2’, ‘obj3’]

for obj in list:
mesh =[‘meshToReplace’]

PS I know there is Ctrl+L but what when “restrict selection” is used.

This effectively creates instances out of all the objects in the list.

list = ['obj1','obj2','obj3']
me ="meshToReplace")
if me != None:
    for obj in list: = me

tnx buddy :slight_smile: