initial
This commit is contained in:
21
20250805143427-python_sorted_function.org
Normal file
21
20250805143427-python_sorted_function.org
Normal file
@@ -0,0 +1,21 @@
|
||||
:PROPERTIES:
|
||||
:ID: 3bbc6099-0187-4bf2-9282-97e5fa443f72
|
||||
:END:
|
||||
#+title: python-sorted-function
|
||||
#+filetags: :python:notes:functions:
|
||||
|
||||
Syntax
|
||||
|
||||
*sorted(iterable, key=key, reverse=reverse)*
|
||||
|
||||
Parameter Values
|
||||
|
||||
+-----------+---------------------------------------------------------------------------------------------+
|
||||
| Parameter | Description |
|
||||
+-----------+---------------------------------------------------------------------------------------------+
|
||||
| iterable | Required. The sequence to sort, list, dictionary, tuple etc. |
|
||||
+-----------+---------------------------------------------------------------------------------------------+
|
||||
| key | Optional. A Function to execute to decide the order. Default is None |
|
||||
+-----------+---------------------------------------------------------------------------------------------+
|
||||
| reverse | Optional. A Boolean. False will sort ascending, True will sort descending. Default is False |
|
||||
+-----------+---------------------------------------------------------------------------------------------+
|
||||
Reference in New Issue
Block a user