list(A).sorted() returns a sorted copy of alist. Sorting is done by comparing elements with the operator <.
sort