Lets assume that we have a list of elements which looks like this
identifier, url
cars, /cars/1234
motorcycles, /motorcycles/jd723
yachts, /yachts/324lkaj
trucks, /trucks/djfhe
The idea behind this, that i have a static list of items, which will nearly not change. I could put them into an JSON or even a Database, but this would 'cost' time, in my opinion.
Therefore i tought about having this array/list statically in Python.
What i a would need is, how to search for yachts
and get back the second item of the list. What i found so far on the net ist always based on a 2 or multi-dimensional array and then pick the n-th item out of.
How would you do this in Python.