Aug-09-2024, 10:07 AM
The
If the argument is not given, the function/method compares object for object.
If a function is given as argument for
sorted
function and the sort
method of lists takes a key
argument.If the argument is not given, the function/method compares object for object.
If a function is given as argument for
key
, then this function is called for each element and the return value of the key-function is used for comparison. This let you program easily custom sorters.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!