<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
</div>In that case, Dave's suggestion to read into a list and iterate over<br>
the list is to be strongly considered. But I'm not entirely sure what<br>
your goal is here. Are you trying to make the Cartesian product of the<br>
two files, where you have one line in the output for each possible<br>
pair of matching lines? That is, for each line in the first file, you<br>
make a line in the output for each line in the second? That's what<br>
your code will currently do.<br></blockquote><div><br></div><div>No , I dont want that , actually both files have equal no of lines, I want to read the first line of f1 , take 2 datas from it, nd then read first line of f2, take data from it, <br>
</div><div>then print them to the same first line of new file i.e nf. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
ChrisA<br>
<span class="HOEnZb"><font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br></div></div>