Sign Up

Lists

Twidget offers a variety of commands to help you manipulate lists easily without coding. Below is a detailed explanation of each command available.

Get

Description: Returns the element in the provided list at the given index.

Inputs:

  • list: The list from which to get the element.

  • index: The index of the element to return.

Output: The element at the given index in the list.

First

Description: Returns the first element of the provided list.

Inputs:

  • list: The list from which to get the first element.

Output: The first element of the list.

Last

Description: Returns the last element of the provided list.

Inputs:

  • list: The list from which to get the last element.

Output: The last element of the list.

Add

Description: Adds the provided item to the end of the provided list.

Inputs:

  • list: The list to which the item will be added.

  • item: The item to be added to the list.

Output: The number indicating the new size of the list.

Insert

Description: Inserts the provided item at the given index in the provided list.

Inputs:

  • list: The list to which the item will be inserted.

  • item: The item to be inserted.

  • index: The index at which to insert the item.

Output: The number indicating the new size of the list.

Add All

Description: Adds all of the elements in the second provided list to the end of the first provided list.

Inputs:

  • list_1: The list to which elements will be added.

  • list_2: The list containing elements to be added to list_1.

Output: None.

Remove by Index

Description: Removes the element at the given index from the provided list.

Inputs:

  • list: The list from which an item will be removed.

  • index: The index of the item to be removed.

Output: The modified list after removal.

Remove by Object

Description: Removes the specified item from the provided list if it exists.

Inputs:

  • list: The list from which an item will be removed.

  • item: The item to be removed.

Output: A boolean indicating whether an item was removed.

Remove All

Description: Removes all elements from the first list that also exist in the second list.

Inputs:

  • list_1: The list from which elements will be removed.

  • list_2: The list containing elements to be removed from list_1.

Output: None.

Index Of

Description: Returns the index of the first occurrence of the specified object in the provided list.

Inputs:

  • list: The list in which to find the item.

  • item: The item to find the index of.

Output: The index of the first occurrence of the item in the list.

Size

Description: Returns the number of elements in the provided list.

Inputs:

  • list: The list whose size will be returned.

Output: The size of the list.

Clear

Description: Removes all elements from the provided list.

Inputs:

  • list: The list to be cleared.

Output: None.

Reverse

Description: Reverses the order of the elements in the provided list.

Inputs:

  • list: The list to be reversed.

Output: A boolean indicating whether the list was successfully reversed.

Shuffle

Description: Randomly shuffles the elements in the provided list.

Inputs:

  • list: The list to be shuffled.

Output: None.

Join

Description: Concatenates all elements of the provided list into a single string using the specified delimiter.

Inputs:

  • list: The list whose elements will be concatenated.

  • delimiter: The delimiter to use between elements.

Output: A string containing all elements of the list separated by the delimiter.

Is Empty

Description: Checks whether the provided list is empty or not.

Inputs:

  • list: The list to check.

Output: A boolean indicating whether the list is empty.

Not Empty

Description: Checks whether the provided list is not empty.

Inputs:

  • list: The list to check.

Output: A boolean indicating whether the list is not empty.

Contains

Description: Checks whether the provided list contains the specified item.

Inputs:

  • list: The list in which to check.

  • item: The item to check for in the list.

Output: A boolean indicating whether the item is in the list.

Related Topics

Text

Twidget offers a variety of commands to manipulate text in various ways. To Uppercase. Converts all characters of the provided text to uppercase. - text: The text to be converted to uppercase. - A text string with all characters in uppercase. To Lowercase. Converts all characters of the provided tex...

Miscellaneous

Twidget provides several miscellaneous commands to facilitate various tasks. Is Null. Description: Checks whether the provided value is null or not. Inputs: - value: The value to be checked. Output: - boolean: Returns `true` if the value is null; otherwise, returns `false`. Not Null. Description: Ch...

Loops

In Twidget, loops allow you to execute commands multiple times, either based on a condition or through a set number of iterations. Loops can also be nested, meaning you can run loops within other loops, creating complex logic for your tasks. List Loop. The `List Loop` command enables you to loop thr...

Database

Twidget offers many commands to manage data in your database. Below is a list of the available commands and their functionalities: Get Data. Retrieve an entry from a table. Get Multiple Data. Retrieve multiple entries from a table. Save Data. Save an object to a database table. Save Multiple Data. S...

Return

The `return` command in Twidget is a special command used to halt the current command workflow and immediately return a specified result. This command overrides any subsequent processes and outputs the return result regardless of the rest of the workflow logic. This command is particularly useful fo...