How to get x,y,z location from a list with python? How to get location from a list with python?
list = [&quot;Cube1&quot;,&quot;Cube2&quot;, &quot;Cube3&quot;]
How can I get the Y location for the list?
I can get it for each individual object:
C1= bpy.data.objects[&quot;Cube1&quot;].location

But I don't know how to convert list to [(X,Y,Z),(X,Y,Z),(X,Y,Z)]
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 )