And to complete the answer and stay in the example:
import itertools
a = [1, 2, 3]
b = [4, 5, 6]
c = list(itertools.product(a, b))
idx = c.index((1,4))
But this will be the zero-based list index, so 0 instead of 1.
And to complete the answer and stay in the example:
import itertools
a = [1, 2, 3]
b = [4, 5, 6]
c = list(itertools.product(a, b))
idx = c.index((1,4))
But this will be the zero-based list index, so 0 instead of 1.