This question already has an answer here:
I would like to duplicate a mesh object, but on a particular object. Right now this is working:
import bpy for i in range (0,5): bpy.ops.object.duplicate(linked=0,mode='TRANSLATION') bpy.data.objects['cube.001'].animation_data_clear()
The way I want it to do it though is that the script should only duplicate a particular object in the scene that I enter through as a string name. ATM its just duplicating the 1st object and duplicating the duplicates of the duplicates.