As an example, right now I have a list of:
list = [[1276, 'c'], [910, 'b'], [819, 'o'], [759, 'z'], [699, 'l']]
and I would like to index this list for only a specific letter, for instance:
index = list.index('c')
As is, I realize that I'm going to get a ValueError, and I've learned that to make this work, I would need to index for the entire sublist.
index = list.index([1276,'c'])
Is there anyway I can work around having to index for the list as a whole, given that I don't currently know the integer value?
I hope this all makes sense, and if needed, I can certainly provide further clarification.
Thank you