what does sort do in python code example
Example 1: sort in python'
arr = [1,4,2,7,5,6]
#sort in ascending order
arr = arr.sort()
#sort in descending order
arr = arr.sort(reverse = True)
Example 2: sorting python array
sorted(list, key=..., reverse=...)
Example 3: how to sort a list in python
old_list = [3,2,1]
old_list.sort()
Example 4: sorting in python
python list sort()