Here's the solution to find y list index in x big list
def getsubidx(x, y):
l1, l2 = len(x), len(y)
for i in range(l1):
if x[i:i+l2] == y:
return i
Is it possible to transform this to oneliner using itertools, filter or something else?