(f)
return len(f) - 1
Return the leading degree of ``f`` in ``K[x]``.

    Note that the degree of 0 is negative infinity (the SymPy object -oo).

    Examples
    ========

    >>> from sympy.polys.domains import ZZ
    >>> from sympy.polys.densebasic import dup_degree

    >>> f = ZZ.map([1, 2, 0, 3])

    >>> dup_degree(f)
    3
Return the leading degree of ``f`` in ``K[x]``.
Return the leading degree of f in K [ x ] .
def dup_degree(f):
    """
    Return the leading degree of ``f`` in ``K[x]``.

    Note that the degree of 0 is negative infinity (the SymPy object -oo).

    Examples
    ========

    >>> from sympy.polys.domains import ZZ
    >>> from sympy.polys.densebasic import dup_degree

    >>> f = ZZ.map([1, 2, 0, 3])

    >>> dup_degree(f)
    3

    """
    if not f:
        return -oo
    return len(f) - 1
def dup_degree ( f ) : if not f : return - oo return len ( f ) - 1