I have an array like this:
arr = [] arr[0] = \"ab\" arr[1] = \"abcdefgh\" arr[2] = \"abcd\"
After sorting, the output array should be:>
#created a sorting function to sort by length of elements of list def sort_len(a): num = len(a) d = {} i = 0 while i