<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="HOEnZb"><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<br>
</blockquote>
<br></div></div>
That's  "zip"  not  "Zip"<br>
<br>
Have you tried looking at the docs?  Or even typing help(zip) at the python interpreter prompt?<br>
<br>
In rough terms, zip takes one element (line) from each of the iterators, and creates a new list that holds tuples of those elements.  If you use it in this form:<br>
<br>
     for item1, item2 in zip(iter1, iter2):<br>
<br>
then item1 will be the first item of iter1, and item2 will be the first item of iter2.  You then process them, and loop around.  It stops when either iterator runs out of items.<br>
<br>
<a href="https://duckduckgo.com/?q=python+zip" target="_blank">https://duckduckgo.com/?q=<u></u>python+zip</a><br>
   gives me <a href="http://docs.python.org/2/library/functions.html#zip" target="_blank">http://docs.python.org/2/<u></u>library/functions.html#zip</a><br>
<br>
as the first link.<br>
<br>
This will read the entire content of both files into the list, so if they are more than 100meg or so, you might want to use  izip().  (In Python3.x,  zip will do what izip does on Python 2.x)<div class="HOEnZb"><div class="h5">
<br>
<br>
<br>
-- <br>
DaveA<br>
-- <br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-list</a><br></div></div></blockquote><div><br><br><br></div><div>Thanks Dave, I am Sorry ,  true I dint look up for it because as per the Suggetion by Chris, 'break' does solve my problem but I wanted to know a little about 'zip' for I encounter any other problem, parsing these two files.<br>
</div></div><br></div></div>