(f, m, K)
return result
Map ``y`` to ``x**m`` in a polynomial in ``K[x]``.

    Examples
    ========

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

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

    >>> dup_inflate(f, 3, ZZ)
    [1, 0, 0, 1, 0, 0, 1]
Map ``y`` to ``x**m`` in a polynomial in ``K[x]``.
Map y to x ** m in a polynomial in K [ x ] .
def dup_inflate(f, m, K):
    """
    Map ``y`` to ``x**m`` in a polynomial in ``K[x]``.

    Examples
    ========

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

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

    >>> dup_inflate(f, 3, ZZ)
    [1, 0, 0, 1, 0, 0, 1]

    """
    if m <= 0:
        raise IndexError("'m' must be positive, got %s" % m)
    if m == 1 or not f:
        return f

    result = [f[0]]

    for coeff in f[1:]:
        result.extend([K.zero]*(m - 1))
        result.append(coeff)

    return result
def dup_inflate ( f , m , K ) : if m <= 0 : raise IndexError ( "'m' must be positive, got %s" % m ) if m == 1 or not f : return f result = [ f [ 0 ] ] for coeff in f [ 1 : ] : result . extend ( [ K . zero ] * ( m - 1 ) ) result . append ( coeff ) return result