fork download
  1. def f(n):
  2. final_n = []
  3.  
  4. for x in range(0,len(n)):
  5. max=n[0]
  6. if n[x]>max:
  7. index = x
  8. max=n[x]
  9. final_n.append(max)
  10. n.remove(max)
  11. print(n)
  12. a=[2,8,4,3,6]
  13. f(a)
Success #stdin #stdout 0.04s 9724KB
stdin
Standard input is empty
stdout
[2, 8, 4, 3]