Iteration in a single line
<p>I have some code of the form:</p>

<pre><code>for i in range(nIterations):
    y = f(y)
</code></pre>

<p>Where <code>f</code> is a function defined elsewhere. hopefully the idea of that code is that after it's run <code>y</code> will have had  <code>f</code> applied to it <code>nIterations</code> times.</p>

<p>Is there a way in python to write this in a single line?</p>
