My question is the result of the issue I'm fighting with at the moment. What I need to do is to use something like that:
if myString in list[][1]:
do something
...on a structure like that:
[
[object1Name, string_1, string_2],
[object2Name, string_1, string_2],
[object3Name, string_1, string_2],
[object4Name, string_1, string_2]
]
I need to check if myString is equal to string_1 in any of the top-level list items and (later) also get the index of top-level list items that fulfill the condition.
I am aware that I can implement it using additional for loop with if statement inside to cycle through all elements in top-level list but I wan't to avoid that. I want a one-liner preferably with "in" but if it's not possible anything else.
I also need to do the exact same thing for dictionary instead of list (which I hope will use more or less same solution).