secant method in Python to solve f(x) = 0 : <p>How can I use the secant method in Python to solve the equation f(x) = 0 given 2 intial guesses, x0 and x1?.</p>

<pre><code>def secant(f,x0,x1,tol):
</code></pre>

<p>I need to use it to find solutions to quadratics and higher factors of x, for example, x^3 -4x^2 + 1 = 0 for a given interval.
This is just a shot in the dark so any links to useful websites will also be appreciated!</p>
