<div dir="ltr"><div class=""><img class="" id=":oj" tabindex="0" src="https://mail.google.com/mail/images/cleardot.gif" alt=""></div><div>Thanks guys for help with previous question. its working now.<br><br></div><div>I have another question. I need to extract information. so i now have a file like this :<br>
<br>TRAN 1 Time= 3.17098E-08 Dt= 3.17098E-08 [y] snes_conv_reason: 3<br>
newton = 36 [ 36] linear = 36 [ 36] cuts = 0 [ 0]<br> --> max chng: dcmx= 5.0315E-08 dc/dt= 5.0315E-08 [mol/s]<br> TRAN 2 Time= 6.34196E-08 Dt= 3.17098E-08 [y] snes_conv_reason: 3<br>
newton = 4 [ 40] linear = 4 [ 40] cuts = 0 [ 0]<br>
--> max chng: dcmx= 3.0785E-08 dc/dt= 3.0785E-08 [mol/s]<br> TRAN 3 Time= 1.26839E-07 Dt= 6.34196E-08 [y] snes_conv_reason: 3<br> newton = 4 [ 44] linear = 4 [ 44] cuts = 0 [ 0]<br>
--> max chng: dcmx= 3.5161E-08 dc/dt= 1.7580E-08 [mol/s]<br>
<br>--------------------------------------------------------------------------------------<br>TRAN <span style="background-color:rgb(255,153,0)">1</span> <span style>Time</span>= <span style="background-color:rgb(255,153,0)">3.17098E-08</span> <span style>Dt</span>= <span style="background-color:rgb(255,153,0)">3.17098E-08</span> [y] snes_conv_reason: 3<br>
newton = <span style="background-color:rgb(255,153,0)">36</span> [ 36] linear = <span style="background-color:rgb(255,153,0)">36</span> [ 36] cuts = <span style="background-color:rgb(255,153,0)">0</span> [ 0]<br>
--> max chng: dcmx= 5.0315E-08 dc/dt= 5.0315E-08 [mol/s]<br><br><br></div><div>In
this file i need the following information to be extracted in each
consequetive 3 lines. Could you please let me know how I can do this.<br>
<br></div><div>At the end i want to have a text file at the output producing this:<br><br></div><div>1 Time 3.17098E-08 Dt 3.17098E-08 newton 36 linear 36 cuts 0<br><br><br></div><div>Id appreciate any hints,<br></div><div>
ive just started python 2 days ago )))<br><br></div>thanks</div>