I have two lists who are generated, one is a simple list of words, and another a list of lists of words. What would be the fastest way to check if elements in the list are in the list of lists and get the indexes?
E.g.
lists=[["apple","car"],["street","beer"],["plate"]]
Test=["apple","plate"]
# should return [(apple,0),(plate,2)] apple is inside first list and plate inside 3rd list
Test2=["car","street"]
# should return [(car,0),(street,1)]
Test3=["pineapple"]
# should return [] because pineapple isn't inside lists
i have difficulties to implement a solution because i have never worked with list of lists. Can someone help me or at least guide me?