Partitioning a list

Poul Riis priisdk at gmail.com
Tue Aug 21 17:36:30 EDT 2018


I would like to list all possible ways to put N students in groups of k students (suppose that k divides N) with the restriction that no two students should ever meet each other in more than one group. 
I think this is a classical problem and I think there must be a python solution out there but I cannot find it. For instance, numpy's array_split only lists one (trivial) split.
I would be happy if someone could refer me to a general python algorithm solving the problem.

Poul Riis 



More information about the Python-list mailing list