Lists Blocks
Last updated
Last updated
The list blocks allow you to work with lists or arrays of elements. This includes operations like adding or removing items from a list, accessing specific items by their position, and sorting items. List blocks allow you to manipulate and manage data, making it easier to store, organize, and process multiple pieces of information.
This block allows you to define the items you want in your list and the specific order in which you want them arranged. Click the gear icon to add or remove list items.
This block allows you to create an empty list.
This block returns a random item or performs mathematical calculations on a list, including sum, minimum, maximum, average, etc. Returns the result of the chosen operation on a list of numbers. Returns "NaN" if the operation cannot be performed on the given list of values.
This block analyzes a list and returns the length of a list as a number. Click the gear icon to add or remove list items.
This block generates a copy of a list with the items shuffled in a random order.
This block checks if a list contains a given item. Returns true or false.
This block returns the position of the first or last occurrence of an item in a list, where the index of the first item is 1. Returns 0 if the item is not in the list.
Each item in a list has an index number. The first item in a list is 1, the second is 2, etc. This block allows you to get, get and remove, or remove:
An item at position X
An item X items from the end of the list
The first item
The last item
A random item
These blocks allows you to modify a list. You can insert an item at the specified location or set the item at the specified location to the new value.
This block allows you to sort a list alphabetically or numerically, ascending or descending. This can be especially helpful if you import a list from a data source.
This block returns a sub-list of items between two positions in a longer list.
This block creates a list between two numbers with a defined increment. For example:
A list of numbers from 1 to 5 by 1 is [1, 2, 3, 4, 5]
.
A list of numbers from 2 to 10 by 2 is [2, 4, 6, 8, 10]
.
This block creates a list of a given item repeated a specified number of times.
This block allows you to create a list from text or a text from a list and define the delimiter (e.g. ",").
This block checks whether or not a list is empty and returns true or false.