Apr-20-2020, 01:47 PM
(This post was last modified: Apr-20-2020, 01:47 PM by deanhystad.)
k = input("enter value") gets a string. Are you expecting your sort routine to sort strings or numbers? For strings, '2' > '10'. Also remember that python list indices start at zero, so you might want to look at the range checking in your while statement.