(f, c, u)
Return True if ``f`` is constant in ``K[X]``.

    Examples
    ========

    >>> from sympy.polys.densebasic import dmp_ground_p

    >>> dmp_ground_p([[[3]]], 3, 2)
    True
    >>> dmp_ground_p([[[4]]], None, 2)
    True
Return True if ``f`` is constant in ``K[X]``.
Return True if f is constant in K [ X ] .
def dmp_ground_p(f, c, u):
    """
    Return True if ``f`` is constant in ``K[X]``.

    Examples
    ========

    >>> from sympy.polys.densebasic import dmp_ground_p

    >>> dmp_ground_p([[[3]]], 3, 2)
    True
    >>> dmp_ground_p([[[4]]], None, 2)
    True

    """
    if c is not None and not c:
        return dmp_zero_p(f, u)

    while u:
        if len(f) != 1:
            return False
        f = f[0]
        u -= 1

    if c is None:
        return len(f) <= 1
    else:
        return f == [c]
def dmp_ground_p ( f , c , u ) : if c is not None and not c : return dmp_zero_p ( f , u ) while u : if len ( f ) != 1 : return False f = f [ 0 ] u -= 1 if c is None : return len ( f ) <= 1 else : return f == [ c ]