On Fri, Jun 15, 2012 at 2:47 AM, Chris Smith <[email protected]> wrote:

> >>> print filldedent(flatten([list(set(permutations(c))) for c in
> combinations_w
> ith_replacement(range(n),n) if sum(c) == n-1], 1))
>
> [(0, 2, 0), (0, 0, 2), (2, 0, 0), (0, 1, 1), (1, 1, 0), (1, 0, 1)]
>

Ah, yeah, something like that will work, thanks.

Sean

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to