You can download this code by clicking the button below.
This code is now available for download.
This function takes an arbitrary number of arguments and returns a list sorted by length.
Technology Stack : Built-in functions, sorting, variable arguments
Code Type : Sort function
Code Difficulty : Beginner
def a_sort_by_length(*args):
return sorted(args, key=len)