How to get the updated location of a vertices on different frames?

I am trying to extract animated vertex information. I have a scene set up with a simple triangle that is animated via a shape key. On frame 1 its ine one location and in frame 5 it is else where.

Now I am trying to get the location of these vertices on each of the different frames but so far been unable to see to .co get updated.

import bpy

# frames[0].frame_start[0].frame_end

# total frames

print("total frames=",total_fr)

mesh=bpy.context.selected_objects[0]          #set frame to first one

for r in range(0,total_fr):
    print("working frame = ",r+fr_start)[0].frame_set(r+fr_start)    #Though this might do it!
    if r==0:
        print("capture 1st",[0].co)

        print("export delta",[0].co)

Any idea on how I can see the updated location of these verts on each frame?

I think you might need object.to_mesh().

This returns the mesh with all modifiers applied.

if you used frame_current to set the frame, animations would not change geometry - but as this isn’t the case, Shape Keys appears to be treated like a modifier.

Just tested it out and as Atom said, to_mesh() does the job

me = bpy.context.object.to_mesh(scene=bpy.context.scene, apply_modifiers=True, settings='PREVIEW')
for v in me.vertices: