Is it possible to slice a sorted list based on some key value (e.g the length of the list items)? If so, how?
For example I get a sorted list like this:
sorted_list = sorted(some_list, key=len)
Now I want to get a slice containing all items with the lowest and equal len (i.e. all items of len:
min(sorted_list, key=len) ) which should be the at the head of the sorted list.