How should I generate a sub-list from a list with help of start and end indexes?

Hi!

I am trying to generate a sub-list from a main list, with the help of a start index & end index. Here’s an example - Let’s say I have this list :

  • Apple [1]
  • Banana [2]
  • Mango [3]
  • Melon [4]
  • Grapes [5]
  • Raspberry [6]

Now I want to get a sub-list from indexes [3] to [5] which should return me {Mango, Melon, Grapes}. In my real app, the list is ~10,000 items. I thought of using a for-number loop, with from set to my start no., and to set to my end no.; but since my list is too large, I think it might slow down my app.

Is there any way I can achieve this? Or is there any advanced lists extension which I could use for this?

Your guidance would be very appreciated. Thanks!

Have you tried this…

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.