def evaluate(x, poly):
    """
    Evaluate the polynomial at the value x.
    poly is a list of coefficients from lowest to highest.

    :param x:     Argument at which to evaluate
    :param poly:  The polynomial coefficients, lowest order to highest
    :return:      The result of evaluating the polynomial at x
    """
    if len(poly) < 1:
        return 0
    else:
        return x * evaluate(x, poly[1:]) + poly[0]