Recently I had to find which list something was in. I used:
def findPoint(haystack, needle): # haystack = [[1,2,3], [4,5]...,[6,7,8,9]] for x in range(le
Yes, no need for range, for starters
for hay in haystack: if needle in hay: return hay
And if you really really need the index, use enumerate
enumerate
for x, hay in enumerate(haystack): if needle in hay: return x