The as_coeff_Add method is probably what you want: >>> (x+y).as_coeff_Add() (0, x + y) >>> (x+y+3).as_coeff_Add() (3, x + y) >>> (3*x).as_coeff_Add() (0, 3*x) >>> (x+y+3.0).as_coeff_Add() (3.00000000000000, x + y)
/c -- 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.
