Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
How ease an array can be sorted with a key? solution in Clear category for Absolute Sorting by ArchTauruS
"""How ease an array can be sorted with a key?
sorted() function has keyword parameter 'key' which can be set with a function.
This 'key' function's return values are the keys that sorted() function based to sort.
"""
def checkio(numbers_array):
return sorted(numbers_array, key=abs)
Nov. 9, 2018
Comments: