Do you want something like this, then:
>>> eq=a**2+b+5*c+2
>>> eq.as_coefficients_dict()
defaultdict(<type 'int'>, {1: 2, c: 5, b: 1, a**2: 1})
>>> dict(_)
{1: 2, c: 5, b: 1, a**2: 1}-- 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.
