Ok, so I want to get the index of a component in a list of tuples that has a given value. Here's an example of what I have done so far:
import random
tuples=[('a', 1.09), ('b', 5.89), ('c', 6.85), ('d', 9.48)]
x = random.choice(tuples)[0]
Here, Im randomly getting back a,b,c or d(x). Now, I want to find the index of the component that contains x in the "tuples" list.
Hope you see my point!