distinct()
Table of Contents
Overview
The distinct() function takes a listVariable as argument, and returns the list only with unique values in it.
Return Type
- List
Syntax
<variable> = <listVariable>.distinct();
Parameter | Description | Data type |
<variable> | Variable which will contain the returned list. | LIST |
<listVariable> | The list from which only unique elements will be returned. | LIST |
Examples
listVar = {"1", 1, 1, 2, 2, 3}; uniqueList = listVar.distinct(); Info uniqueList; //returns {1, 1, 2, 3}