run a function in another function in N times
<p>I have ask this kind of question before, but it seems my previous question is a bit misleading due to my poor English. I'm asking again to make clear. I am really confused about it. Thanks in advance.</p>

<p>Suppose I have a function A for generating the state of a cell in a certain rule, and I have another function which generates the state of a cell for N times, and each time the rule is as same as the fist function. And, yeah, don't know how to do it...</p>

<pre><code>def 1st_funtion(a_matrixA)
    #apply some rule on a_matrixA and return a new matrix(next state of the cell)
    return new_matrix

def 2nd_funtion(a_matrixB,repeat_times=n)
    #how to import the 1st_funtion and run for n times and return the final_matrix?
    #I know if n=1, just make final_matrix=1st_funtion(a_matrixB)
    return final_matrix
</code></pre>
