Try all the combinations (cases) Function
<p>I've been struggling with the <a href="http://en.wikipedia.org/wiki/Cutting_stock_problem" rel="nofollow">cutting stock problem</a> for a while, and I need to do a funcion that given an array of values, gives me an array of array for all the possible combinations.</p>

<p>I trying to do this function, but (as everything in python), I think someone must have done it better :).</p>

<p>I think the name of the function is combination. Does anyone know whats the best way to do this, and what's the best module and function for this</p>

<p>P.s. I have read some papers on the matter, but the matematical terms dazzle me :)</p>
