l = [None, int, 0, 'abc', [1, 2, 3], ('a', 'b')]
for i in itertools.product(*[(i if isinstance(i, (list, tuple)) else [i]) for
    i in l]):
    print(list(i))
Recursive "all paths" through a list of lists - Python