def find_permutations(l):
    n = [e for e in l if e]
m = [j for i in n for j in (i, 0)][:-1]

def fill(m):
    if len(m) == len(l):
        yield tuple(m)
Permutations but with some numbers kept in an order