Given this input: [1,2,3,4]
I\'d like to generate the set of spanning sets:
[1] [2] [3] [4] [1] [2] [3,4] [1] [2,3] [4] [1] [3] [2,4] [1,2] [3] [4] [1,3]
Here's The SUNY algorithm repository page on the problem. Maybe you can translate one of the code references to python.
Edit: This was a similar problem. Here is the SUNY repository page about generating partitions, which I believe is the correct problem.