Get list of indices from searching for values in list of lists
The most straightforward approach would be

    for listno, alist in enumerate(list_of_lists):
        for n in alist:
            indices[n] = listno


It surely gives better performance. Is it enough, I don't know.