[SciPy-user] Finding all combinations of numbers

David Warde-Farley dwf@cs.toronto....
Sun Jan 13 01:12:16 CST 2008


On 13-Jan-08, at 2:05 AM, David Warde-Farley wrote:

> If you wanted to exclude the empty, replace range(2**N) with
> range(1,2**N), skipping the number 0. If you want it to include the
> entire list, make the upper limit 2**N+1.

And once again, I'm double-replying. I goofed; 2**N is the right upper  
limit to include L itself, so to exclude the 'full' subset, use 2**N -  
1.

DWF


More information about the SciPy-user mailing list