A neat way to iterate over two items of the same length
By Collin Anderson
I assume this is memory effeicient.
for line1, line2 in zip(file('file1.txt'), file('file2.txt')):
print line1, line2
Tags: iter, iteration, python
This entry was posted on May 27, 2008 at 6:39 am and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.