# This program implements the selecction sort algorithm def selSort(l): n = len(l) for i in range(n-1): min = l[i] indMin = i for j in range(i+1, n): if min > l[j]: min = l[j] indMin = j l[i], l[indMin] = l[indMin], l[i] def main(): l = input("Entere the list of data: ") print "Unsorted data: ", l selSort(l) print "Sorted data: ", l main()