Iterating over For loop

I have been working with csv files lately and i know there is a command of “ForEach” which basically iterates every row in the csv file.

i want to add a loop with dynamic length or i can pass a variable in the loop to adjust the length of the iterating for loop.

Anyone have any suggestions regarding this…