I have nested list of numbers
my_list = [[0,1,2,3,4,5],[6,7,8,9,10,11],[12,56,86,9],[55,53,12]]
and I would like to know to which sublists a given number belongs to
For instance, if I'm searching for the number 1
the algorithm should return 0, because 1 belong the first sub-list.
If I'm looking for 9, I should get 1 and 2.
I've seen there's already a solution here Python search in lists of lists
but the problem is that I'm working with a very large number of lists and loops are not the best solution.
Is there any build-in python function that may come in handy?