You would have to use a For loop in your Python script.
See something like this, or search for “For Loop”: