Split List

The Split List node splits up a list into equal chunks.

The Slice List node splits up a list into equal chunks or slice out a part of a list.

How to use the Split List node

 

Connect your list to the data_list socket.

This node splits the list into equally sized chunks, which are each a list of their own. Think of it as a list of lists. The size determines how many items show up in each chunk.

Let’s assume a list of 6 letters:

input: data_list
["A", "B", "C", "D", "E", "F"]
Notion image

Setting the size to 2 splits the list into three lists of 2 items each.

output: list_of_lists
[
  ["A", "B"],
  ["C", "D"],
  ["E", "F"]
]
⚠️
Note that the last chunk may be smaller if the list cannot be cleanly devided up.
 
Did this answer your question?
😞
😐
🤩

Last updated on January 31, 2023