Number Sequencing, Grouping and Filtering

Chris Rebert clp2 at
Tue Mar 10 11:02:49 CET 2009

On Tue, Mar 10, 2009 at 2:54 AM, flebber <flebber.crue at> wrote:
> Hi
> I was hoping someone would be able to point me in the direction of
> some good documentation regarding sequencing, grouping and filtering
> and in which order they should be done.
> As a small example it is easy to create the range of numbers 1 to 20.
> But if I wanted to group all possible combinations of sets of 4
> numbers within this range is there already an in uilt function for
> this I am searching the module docs with "number sequencing" and
> "number grouping" but cannot find info.

I think itertools (
combined with list comprehensions
should be able to accomplish what you want.


I have a blog:

More information about the Python-list mailing list