list of selected objects ? in 2,5

is it possible and how in a loop to make a list of created object
to be used after as a list of objects to be joined somehow ?

cause the join seems to work on a selected list of objects!

Thanks