notes/Blender Python get location of all objects-xNNhcCTk.sh
import bge

scene = bge.logic.getCurrentScene()

for i in scene.objects:
    print(i, " position is:");
    print(i.position);
    
#or

for i in scene.objects:

    print(i, " x position is: ", i.position.x);
    print(i, " y position is: ", i.position.y);
    print(i, " z position is: ", i.position.z);
    print("===============================");

syntax highlighted by Code2HTML, v. 0.9.1