arr = [(3,2), (1,2), (0,4), (9,7)]
k = lambda x : x[0] #key, optional
rev = False # reverse, optional
sorted(arr, key=key, reverse=reverse)
var = sorted(old_var)
>>> sorted({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'})
[1, 2, 3, 4, 5]
>>> sorted([5, 2, 3, 1, 4])
[1, 2, 3, 4, 5]
>>> a = [5, 2, 3, 1, 4]
>>> a.sort()
>>> a
[1, 2, 3, 4, 5]