Sorting a list without using .sort()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • achenini
    New Member
    • Nov 2013
    • 1

    Sorting a list without using .sort()

    I want to be able to sort a list without using the sort function.
    I have this algorithm down:
    BEGIN
    make a copy of the list
    make an empty result list
    LOOP as long as the copylist isn't empty:
    find the minimum value in the copylist, remove it
    add that minval to the end of the resultlist
    return the result list
    END

    but I can't seem to put into syntax for for python (3.3)
Working...