sort_by_length(words) that returns a new list of the strings in words sorted by length ascending, using sorted() with a key function. For strings of equal length, preserve their original relative order.words = ['banana', 'fig', 'kiwi', 'a']
['a', 'fig', 'kiwi', 'banana']
Sorted by len(); sort is stable so equal-length ties keep original order.
sorted(words, key=len) sorts by each string's length.