from zerofinding import secant def f(x): return (x-1)**3 secant(f,0.5,1.2,10**(-15),7,1)