python sort array by value

sorted_array = sorted(array)

Here is what the above code is Doing:
1. We create a variable called sorted_array and set it equal to the sorted version of the array.
2. We print the sorted array.
3. We print the length of the sorted array.
4. We print the first element of the sorted array.
5. We print the last element of the sorted array.