スコアを計算するためのリストと関数がある場合、次のように argmax を計算できます。
maxscore = 0; argmax = None
x = [3.49, 0.122, 293, 0.98] # Imagine a LARGE list.
for i in x:
# Maybe there're some other func() to calculate score
# For now just sum the digits in i.
score = sum([int(j) for j in str(i) if j.isdigit()])
print i, score
if maxscore < score:
maxscore = score
argmax = i
argmax を達成する他の方法はありますか? そうするためのpythonicの方法は何ですか?