fork(1) download
  1. def select_sort(lst):
  2. length = len(lst)-1
  3. while length > 1:
  4. imax = 0
  5. imax = max(lst[:length])
  6. indexmax = lst.index(imax)
  7. temp = lst[length]
  8. lst[length] = imax
  9. lst[indexmax] = temp
  10. length -= 1
Success #stdin #stdout 0.01s 7688KB
stdin
Standard input is empty
stdout
Standard output is empty