set partitioning

hymort at hotmail.com hymort at hotmail.com
Mon May 1 20:46:29 EDT 2006


For the list [1,2,3,4], I'm looking for the following for k = 2:

[[1,2], [3,4]]
[[1,3], [2,4]]
[[1,4], [2,3]]

for k = 3:

[[1,2,3], [4]]
[[1,2,4], [3]]
[[1,3,4], [2]]
[[2,3,4], [1]]




More information about the Python-list mailing list