>>> eq=a*A+b*c*B+d
>>> zip(*[arg.args_cnc() for arg in eq.args])
[([a], [d], [b, c]), ([A], [], [B])]

(A and B are non-commuting.)

-- 
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