How to iterate over a file in python in a particular way as described below.
<p>A file ProgramInput.txt has this as its content</p>

<pre><code>&lt;start&gt;
content
...
...
...
&lt;stop&gt;

&lt;start&gt;
content
...
...
&lt;stop&gt;
</code></pre>

<p>and so on</p>

<p>How do I iterate over the txt file , so that I take out the content between each  and  and store it in a different file in each iteration ?</p>
