"Swroteb" <[EMAIL PROTECTED]> writes: > Atrocious and slow, I'm sure, but is there a better way? I can't > simply create a list with the combinations I want, since it won't fit > into memory. And I'm sure I can do it using a standard paradigm using > five indexed for loops (ie, for i = 1, for j = i+1, for k = j+1, etc.). > But is there a really nice way to handle this in Python?
Is this a homework problem? Hint: 1) use recursion; 2) use generators. -- http://mail.python.org/mailman/listinfo/python-list