Write a program selection_sort.py
that includes a sort(lst)
function that takes the list lst
and performs a selection sort on it.
Include a main()
function that creates a list, then calls the sort()
function on that list. Display the list before and after sorting.
Example Output:
The original list is [3, 5, 7, 2, 11, 13, 4, 0]
Calling the .sort() function...
The sorted list is [0, 2, 3, 4, 5, 7, 11, 13]