def n_max(list, n): y = range(len(list)) i = sorted(y, key=list.__getitem__) res = i[len(list)-n:len(list)] res.reverse() return res
No comments:
Post a Comment