Skip to content

CreateList 1.0.0

Overview

Misc Beginner

Version Source

Description

A flexible list creation block that accepts any number of input parameters and combines them into a single list. Each input becomes an element in the output list, preserving order and maintaining the original data types of all inputs.

Configuration Options

No configuration options available.

Inputs

NameData TypeDescription
*itemsAnyVariable number of input items to include in the list. Each input becomes a separate element in the output list, regardless of data type.

Outputs

NameData TypeDescription
listlist[Any]The created list containing all input items in the order they were provided.

Examples

# Create a simple list from multiple values
name: create_priorities
type: CreateList
inputs:
  item1: "high"
  item2: "medium"
  item3: "low"
outputs:
  list: "priority_levels"

Error Handling

No Inputs Provided

Error Code
No Error
Common Cause
Block receives no input parameters
Solution
This is valid behavior - the block will return an empty list ([]). Ensure upstream blocks provide the expected inputs if you need a populated list.

Large Data Memory Issues

Error Code
MemoryError
Common Cause
Attempting to create very large lists with memory-intensive objects
Solution
For large datasets, consider using streaming approaches or BuildList for incremental list construction

FAQ

How many items can I include in a single list?

There's no hard limit imposed by the block itself. The practical limit depends on available memory and the size of individual items. For very large lists, consider using BuildList for incremental construction.

Does the order of inputs matter?

Yes, the order of items in the output list matches the order they were provided as inputs. This makes CreateList predictable for ordered data structures.

Can I mix different data types in one list?

Absolutely! CreateList accepts Any type for all inputs, so you can freely mix strings, numbers, objects, nested lists, or any other data types in a single list.

What's the difference between CreateList and BuildList?

CreateList creates a new list from all inputs at once. BuildList maintains state and builds a list incrementally by appending one item at a time across multiple calls.

How do I create nested lists?

If you pass existing lists as inputs, they become elements in the new list, creating a nested structure. For example, passing two lists creates a list containing two list elements.

Can I use this block with no inputs to create an empty list?

Yes, calling CreateList with no inputs returns an empty list ([]). This can be useful for initializing list variables or creating default empty states.