diff --git a/SortingAlgorithms/Selection_Sort.py b/SortingAlgorithms/Selection_Sort.py new file mode 100644 index 0000000..94d585c --- /dev/null +++ b/SortingAlgorithms/Selection_Sort.py @@ -0,0 +1,10 @@ +""" Python3 Selection Sort """ + +unsorted = [1,54,2,34,23,3,23,32,5,34,2,23,235,324,6,43] + +sorted = [] +for i in range(len(unsorted)): + sorted.append(min(unsorted[:])) + unsorted.remove(min(unsorted[:])) + +print("Sorted Array:", sorted)