Here you have exchange rates:
usd 1,02
sek 11,48
nok 11,74
dkk 7,44
eur 1
Here you have list of values in different currencies. What is the sum of valus in Euros ?
47 usd
5433 nok
578 dkk
7554 sek
3222 sek
321 eur
This can be tackled with VLOOKUP function.

The sentence in the cell D2 =B2/VLOOKUP(C2;$F$2:$G$6;2;FALSE).
VLOOKUP is checking value in C2 “usd” and checking that in F2:F6 range. When the string was found, the functions picks up the value in one cell right for string, 1,02. Then B2 is divided by 1,02.
The sum of D2:D7 is calculated in D9.
With Python we can calculate the same thing.
The exchange rate is stored in one cell, in Python dictionary.

The content in C2 is:
xr = {
“usd” : 1.02,
“sek” : 11.48,
“nok” : 11.74,
“dkk” : 7.44,
“eur” : 1}
The formula to count the value in Euros in D4 is:
xl(“B4”)/xr[xl(“C4”)]

The formulatext function shows the formula from D4 in F4.
The exchange rates are in dictionary in C2.
The idea of both the solutions is the same. Python is more concise as exchange rates are stored in one cell.