SORT
Description
SORT
will sort the elements in a list. It works on numbers as well as on text. If a string starts with a number will come before strings starting with letters.
Example: Numbers
This will return [1, 5, 76]
.
Example: Text
The sorting will return ['Anna', 'Annabelle', 'Benjamin', 'Laura']
, which is then reversed, so the whole expression returns ['Laura', 'Benjamin', 'Annabelle', 'Anna']
Example: Text with Numbers
In this example, one string starts with a number. It will therefore come before the strings starting with letters, so this expression will return ['101 Dalmatians', 'Aladdin', 'Snow White']
.
Last updated