how to replace all the occurrence in a string with a different number
<p>I have never used python in my life. I need to make a little fix to a given code.</p>

<p>I need to replace this </p>

<pre><code> new_q = q[:q.index('?')] + str(random.randint(1,rand_max)) + q[q.index('?')+1:]
</code></pre>

<p>with something that replace all of the occurrence of ? with a random, different number.</p>

<p>how can I do that?</p>
