Thank you MRAB! Now I can get the corresponding dictionary value A[i,j,k,l] for each key in the varsdict dictionary. However how would I go about multiplying the value of each FEq_(i,_j,_k,_l) key with the A[i,j,k,l] one? Do you have any insight in that?