How to get Global object location - Python I'm trying to make script which will get object.location but it doesn't works: result of my script is: 

Trawa.196 and its location is: Vector (0.0000, 0.0000, 0.0000)&gt;

And every object in my scene has these values

ObjectName = "Grass."
ObjectNameNumber = 1


for i in range(1,200):
if(i&lt;10):
    ObjectName = "Trawa.00" + str(ObjectNameNumber)


    objectTrawa = bpy.data.objects[str(ObjectName)]
    objectTrawa.select = True
    print(ObjectName, "and its location is: ", objectTrawa.location)
    bpy.ops.object.select_all(action='DESELECT')
    ObjectNameNumber+=1
if(i&gt;=10 and i&lt;100):
    ObjectName = "Trawa.0" + str(ObjectNameNumber)
    objectTrawa = bpy.data.objects[str(ObjectName)]
    objectTrawa.select = True
    print(ObjectName, "and its location is: ", objectTrawa.location)
    bpy.ops.object.select_all(action='DESELECT')
    ObjectNameNumber+=1
if(i&gt;=100):
    ObjectName = "Trawa." + str(ObjectNameNumber)
    objectTrawa = bpy.data.objects[str(ObjectName)]
    objectTrawa.select = True
    print(ObjectName, "and its location is: ", objectTrawa.location)
    bpy.ops.object.select_all(action='DESELECT')
    ObjectNameNumber+=1
Thanks @Jaroslav Jerryno Novotny for help: I'm dumb because I forgot to select everything and set origin to center of its surface/volume (every object had pivot in the middle).
But anyway thanks for "objectTrawa.matrix_world.translation" I will use it instead of location
and zfill() function (I didn't even think that this would be so good for my code)

final code

ObjectNameNumber = 1

for i in range(1,649):      
        ObjectName = "Trawa." + (str(ObjectNameNumber).zfill(3))
        objectTrawa = bpy.data.objects[str(ObjectName)]
        objectTrawa.select = True
        print(ObjectName, "and its location is: ",     objectTrawa.matrix_world.translation)
        #bpy.ops.object.select_all(action='DESELECT')
        ObjectNameNumber+=1