def poly(x, *args, export=False):
    """Polynom nth degree for fitting.
    
    :param x: parameter
    :type x: int, float
    :param *args: list of coefficients [a_N,a_N-1, ..., a_1, a_0]
    :type *args: list
    :param export: enable text output of function, defaults to False
    :type export: bool or string, optional
    :return: returns the polynomial
    :rtype: str, int, float


    >>> poly(3.4543, 5,4,3,2,1, export='Mathematica')
    '5*3.4543^5 + 4*3.4543^4 + 3*3.4543^3 + 2*3.4543^2 + 1*3.4543^1'

    >>> poly(3.4543, 5,4,3,2,1)
    920.4602110784704
    """
    a = list(args)
    if export == 'Mathematica':
        return ' + '.join([f'{a[i]}*{x}^{len(a)-i}' for i in range(len(a))])
    else:
        return poly(x, *a[0:-1])*x + a[-1] if len(a) > 1 else a[0]