'Returns all non-zero terms from ``f`` in lex order.
Examples
>>> from sympy import Poly
>>> from sympy.abc import x, y
>>> Poly(x**2 + 2*x*y**2 + x*y + 3*y, x, y).terms()
[((2, 0), 1), ((1, 2), 2), ((1, 1), 1), ((0, 1), 3)]
See Also
all_terms'

def terms(f, order=None):

    return [(m, f.rep.dom.to_sympy(c)) for (m, c) in f.rep.terms(order=order)]
