Why doesn’t 'array' have an in-place sort like list does?
A list is a data structure that has characteristics which make it easy to do some things. An array is a very well understood standard data structure and isn't optimized for sorting. An array is basically a standard way of storing the product of sets of data. There hasn't ever been a notion of sorting it.
Why doesn’t the array class have a .sort()? I don't know how to sort an array directly.
The class array.array is a packed list which looks like a C array.
I want to use it because only numbers are needed in my case, but I need to be able to sort it. Is there some way to do that efficiently?