ID EN
Built-in Functions

sorted

Python 3.11

Return a new sorted list from the items in iterable.

Syntax

PYTHON
sorted(iterable, /, *, key=None, reverse=False)

See Also

functools.cmp_to_key() sorted() __lt__() rich comparisons max() __gt__() Sorting HOW TO