hi Paul,
it is always amazing how short these python codes are, given one is used to java!
I use a Map<Integer, List<List<Integer>>> where the key is the length of the lists in the value, and I fill it using recursion, although that is not required. You could start with key = 0.
To make it generic, I have a method that sees all the integers in the map as indices into some List<T>.
But the code is a "few" lines longer than yours...