This is similar to this question with the answer:
search = 'a'
[item[1] for item in data if item[0] == search]
['x']
I modified it to extract all information associated with the search item:
[item[1:] for item in data if item[0] == 'aa90_273024']
returns - [('F5XKBWO01AQCVH', 'F5XKBWO01AQCVH')]
Original list entry: [...('aa90_273024', 'F5XKBWO01AQCVH', 'F5XKBWO01AQCVH')...]
However, I need to do this with a list of several 1000s of search items as a sublist. How should I modify the code to retrieve all search items from the larger list, preferably to a open("result.txt",'w').write()
I’m not quite sure what you’re asking, but here is a solution for what I’ve understood: