Why the mesh didn't follow the armature in the edit mode, how to get the coordinates of points on a mesh that deformed by armature?

I want to randomly deform an object by armature and get the coordinates of points on that object, but after rotating the bones in the armature, I just got the origin coordinates of every points.
I’ve tried:

obj = bpy.data.objects['horse']
mesh = obj.data
for v in mesh.vertices:
    print(v.co)

and also tried

obj = bpy.data.objects['horse']
bpy.ops.object.mode_set(mode='EDIT')
bm = bmesh.from_edit_mesh(obj.data)
for v in bm.verts:
    print(v.co)

However, both code got the origin coordinates of points. Does any one know how to get the coordinates of points in a mesh which follows the armature?