chris webster wrote:But one question you could ask is what happens if the files have different numbers of lines? Hint: check out izip_longest().
Yeah that thing I have taken care of after I posted the code..
We can also use map here (because, size of list returned by zip is equal to the size of shortest list...
Whereas in map, you get size of max list, with corresponding element for other list will be None in the following tuple)