List - Get item a index using sequence?

Hi,

I’m trying to group my data it sets of n, so for example if N was 2, then I would like index (0,1),(2,3),(4,5) together. See screenshot below for example.

Any help would be appreciated.

I would also be interested in a solution using python as I’m trying to get into that.

Thanks

Joe


I think List.Chop will do the job for you.

1 Like
1 Like

Wow thank you, I completely forgot about that node.

Thanks!

1 Like

You’re welcome!

1 Like


You could theoretically do it without List.Chop (I wanted to find out if I could).

2 Likes

2 Likes

That’s the same function still, just in a code block.

I was trying to find a way to do it like that, however the only sequence I knew was x…y…z, didnt know how to make it non-linear.

Thanks!

It can be a pretty useful tool to create lists, it means you can use lists as inputs to so that might be handy.

These can be quite useful :slight_smile:
image

4 Likes

…and that’s new to me as well.
Always something new to learn.