Finding multiple words and print next line using Python
<p>I have huge text file.  It looks as follows</p>

<pre><code>&gt; &lt;Enzymologic: Ki nM 1&gt;
 257000

&gt; &lt;Enzymologic: IC50 nM 1&gt;
n/a

&gt; &lt;ITC: Delta_G0 kJ/mole 1&gt;
n/a

&gt; &lt;Enzymologic: Ki nM 1&gt;
5000

&gt; &lt;Enzymologic: EC50/IC50 nM 1&gt;
1000

.....
</code></pre>

<p>Now i want to create python script to find words like (<code>&gt; &lt;Enzymologic: Ki nM 1&gt;</code>, <code>&gt; &lt;Enzymologic: EC50/IC50 nM 1&gt;</code>) and print next line to each word in tab delimited format as follows</p>

<pre><code>&gt; &lt;Enzymologic: Ki nM 1&gt;     &gt; &lt;Enzymologic: EC50/IC50 nM 1&gt;
257000                       n/a
5000                         1000
.... 
</code></pre>

<p>I tried following code</p>

<pre><code>infile = path of the file
lines = infile.readlines()
infile.close()
searchtxt = "&gt; &lt;Enzymologic: IC50 nM 1&gt;", "&gt; &lt;Enzymologic: Ki nM 1&gt;"
for i, line in enumerate(lines): 
     if searchtxt in line and i+1 &lt; len(lines):
         print lines[i+1]
</code></pre>

<p>But it doesnt work can any body suggest some code...to acheive it.</p>

<p>Thanks in advance</p>
