Write a python function that sorts a list of strings by their length in the descending order


Topic: Write a python function that sorts a list of strings by their length in the descending order

Solution

def sort_by_len(arr):
    return sorted(arr, reverse=True, key=lambda x: len(x))



List all Python Programs