First time here? Check out the FAQ!
answered 2020-03-28 22:25:30 +0100
Where have you searched!?
sage: for s in SetPartitions([1,2,3,4,5], 3): ....: print(s) {{1, 4, 5}, {2}, {3}} {{1, 5}, {2, 4}, {3}} {{1, 5}, {2}, {3, 4}} ... {{1, 2, 3}, {4}, {5}}