pythonのソート方法をよく使うオプションと一緒に紹介
# aの値で大きい順にlをソート l = sorted(l, key=lambda x: a[x], reverse=True)
Register as a new user and use Qiita more conveniently