sorted_list = sorted(my_list)
And the sort is guaranteed to be stable.
https://docs.python.org/3/library/functions.html#sorted
And the sort is guaranteed to be stable.
https://docs.python.org/3/library/functions.html#sorted