fork download
  1. l=[5, 4, 2, 1, 0, 8, 7, 4, 6, 1, 0, 7]
  2.  
  3. f=lambda l,S=sorted:zip(*S(S(enumerate(l),key=lambda(i,x):-x)[:5]))[1]
  4. print f(l)
Success #stdin #stdout 0.02s 9016KB
stdin
Standard input is empty
stdout
(5, 8, 7, 6, 7)