srt()

What does srt() do?

srt() sorts an array or string using the python sorted() function, from smallest to largest

from ArrayExpressions import arrex
lst = [1, 8, 6, 4, 3]
output = arrex.evaluate(lst, "srt(x)")
print(output) # [1, 3, 4, 6, 8]

Other Important Information:

InputAny array or string
Does it create a new scope?No
OutputA sorted array
KNone
ISame index
Examplesrt("acbdfE")
Example ExplanationThis sorts the string to Eabcdef. E is in front because strings are compared by ASCII value, not alphabetically.

cvK()

reK()