Let's say I have a list "A" of length about 40, consisting of integers from 0 to 5, and a list "Score". I want to calculate the sum of Score[A[i]].
Of course, I can do:
sum = 0
for x in A do:
sum += Score[x]
But is there a faster way? I know that numpy can do multiplication of lists, but this requires some sort of indexing.