First we import SymPy and initialize printing:
from sympy import init_printing
from sympy import *
init_printing()
Create a few symbols:
x,y,z = symbols('x y z')
Here is a basic expression:
e = x**2 + 2.0*y + sin(z); e
diff(e, x)
integrate(e, z)