Sorted with random as key , it will compare random.random() of each index.
[34, 12, 5] may have random.random() as [0.33773311433456343, 0.7769153781369283, 0.4401941953084012] as key that they compare. so 34 will have smallest key, and 12 have largest key.
Result will be [34,5,12]