Peter Alexander: > This will be part of my combinatorics library, but is more > general. pairWise is just a specific case of k-subsets (with > k=2). Yes, that's what's written a bit lower in my post, in the combinations() of Python. Bye, bearophile