I have such a situation.
In script I have selected object, who have his own name. But at scene I have some object which I have left after I used this
I want leave object who have own name, and delete rest of object who hame name like cube.001, cube.002, cube.00n
How delete this non selected objects ?
Greets and Thank for help