[SciPy-user] Finding all combinations of numbers
David Warde-Farley
dwf at cs.toronto.edu
Sun Jan 13 02:12:16 EST 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