lst = [1, 2, 3]
per = list(permutations(lst, 1)) + list(permutations(lst, 2)) + list(
    permutations(lst, 3))
Generate all permutations of a list and permutations of the possible lists within that list?