You can only sort lists by a single value, whereas a position vector contains 3 values (x, y, z). You need to be more specific about what exactly you want to sort by, as just sorting by position doesn’t make any sense, to either the computer or a human.
The above code is an example only, and should sort items into cells of 1x1 unit on the horizontal plane, so long as no item has an x-coord above 100 (increase the multiplier if it has). It also won’t work for negative coordinates.
If you provide more details about what it is your trying to achieve, I can try and produce some better code.