I found the sympy library way in this link http://docs.sympy.org/latest/tutorial/manipulation.html
Use .args atribute in the function or result object.
If I have a function:
>>>func = Eq(u(x),−x+sin(x))
>>>func
u(x) = -x + sin(x)
>>>func.args[0]
u(x)
>>>func.args[1]
-x+sin(x)
The same applies for a result that is a finite set type.