CreateList
Overview¶
The CreateList
Block creates a list from the provided items. This is useful when you need to build a list dynamically from multiple inputs.
Description¶
Takes in inputs and creates a list containing the inputs
Metadata¶
- Category: Misc
Configuration Options¶
No configuration options available.
Inputs¶
Name | Data Type | Description |
---|---|---|
*items | Any |
Outputs¶
Name | Data Type | Description |
---|---|---|
list | list[Any] |
State Variables¶
No state variables available.
Example(s)¶
Example 1: Create a list from items¶
- Create a
CreateList
Block. - Provide inputs:
1, 2, 3
. - The Block will output:
[1, 2, 3]
.
Error Handling¶
- The Block will raise an error if the inputs cannot be converted to a list.
FAQ¶
What happens if no items are provided?
The Block will return an empty list if no items are provided.