How to get x,y,z location from a list with python?
Assuming we have the default cube and three clones as our object names, we can build new lists for the locations, and the Y locations. You asked for both in the question and I was unsure which you actually wanted...
import bpy

list = [&quot;Cube&quot;,&quot;Cube.001&quot;, &quot;Cube.002&quot;, &quot;Cube.003&quot;]
locations = []
yLocs = []

for n in list:
    locations.append( bpy.data.objects[n].location )
    yLocs.append( bpy.data.objects[n].location.y )
    
print( locations )
print( yLocs )