I am trying to make a function that takes an input, compares that input to a list of lists and returns an item from another list with the same number of objects.
You can loop through each list in
list_1 and check if the input is in one. If it is, you can print the corresponding index of
list_2 (assuming it is composed only of single values), which you obtain by using enumerate in the loop.
input = 1 for idx,i in enumerate(list_1): if input in i: return list_2[idx]
In this case, I returned