# How do I set frame_end in the scene using script when I switch between different actions?

I have different animations in each action with different duration.

Is there a way to store the length of the duration in each action so that the frame_end can adjust accordingly to it?

bpy.data.scenes["Scene"].frame_end = (animationLength * 24)


only set my frame_end at the last loop in my for loop for creating multiple animation.

import bpy