Print specific coordinates of keyframes?
Avoid the enumerate, change keys to object as Doyousketch2 mentioned.

import bpy
import math

selection = bpy.context.selected_objects

def get_keyframes(obj_list):
    keyframes = []
    for obj in obj_list:
        anim = obj.animation_data
        if anim is not None and anim.action is not None:
            for fcu in anim.action.fcurves:
                for keyframe in fcu.keyframe_points:
                    x, y = keyframe.co
                    if x not in keyframes:
                        keyframes.append(math.ceil(x)) #(math.ceil(x)))
    return keyframes

def print_details(obj_list):
    XRot = round(obj_list.rotation_euler.x, 2)
    ZRot = round(obj_list.rotation_euler.z, 2)
    YRot = round(obj_list.rotation_euler.y, 2)
    xloc = round(obj_list.location.x, 2)
    yloc = round(obj_list.location.y, 2)
    zloc = round(obj_list.location.z, 2)
    print(obj_list.name)
    print("X Rot : ", XRot, '\t'*2, "Y Rot : ", YRot, '\t'*2, "Z Rot : ", ZRot)
    print("X Loc : ", xloc, '\t'*2, "Y Loc : ", yloc, '\t'*2, "Z Loc : ", zloc)


print("-"*25, "starting","-"*25)
for key in get_keyframes(selection):
    bpy.context.scene.frame_set(key)
    print("key : ", key)
    for obj in selection:
        print_details(obj)
print("-"*25, "ending","-"*25)


refer to example How can I get the location of an object at each keyframe?