Number Sequencing, Grouping and Filtering

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


On Tue, Mar 10, 2009 at 2:54 AM, flebber <flebber.crue at gmail.com> 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 (http://docs.python.org/library/itertools.html)
combined with list comprehensions
(http://docs.python.org/dev/tutorial/datastructures.html#list-comprehensions)
should be able to accomplish what you want.

Cheers,
Chris

-- 
I have a blog:
http://blog.rebertia.com



More information about the Python-list mailing list