selection of object

i’m ceating several object of same typ

so i get names like cube - cube.001 cube.002
this is created in a loop
is there a way to select the last created object inside the loop and then do a relocate or rotation on that last object or apply a color material ect?

Thanks


obj = Blender.Object.New(....)
obj.RotX = ....

is this what your meaning?