Search data from plaintext, store new data as a variable

Hi all.

I have very large set of data stored as a plain text file. Example as follows:

uss/inde_ind,13294
uss/isk,1
uss/jpy,126
uss/jpy lrg,0
uss/kes,4
uss/kwd,423
uss/ktz tom,126

I’m trying to build some code that will allow people to search for some specific a terms and copy the numeric value into a variable.

Do you have any advice on how to achieve this?

I believe I would have to use re, in some form or other, but I am quite unfamiliar with this particular library, and any advice would be greatly appreciated.

Thus far, I’ve created the search terms I want to look for:

v1 = "uss/inde_ind"
v2 = "uss/kes"

Then I think I need to do something like but I am really not sure:

re.findall(v1, v2 + '')[0]

To me it looks like the data is structured as key/value pairs. A different approach than using regular expressions could be to read from the file and separate the key (i.e. “uss/inde_ind” or “uss/kes”) and the value associated.
This would allow you to store each key with it’s value in for example a dictionary.
Although every key would have to be unique for this approach.