When is it better to use zip instead of izip?
zip computes all the list at once, izip computes the elements only when requested. One important difference is that ‘zip’ returns an actual list, ‘izip’ returns an ‘izip object’, which is not a list and does not support list-specific features (such as indexing): >>> l1 = [1, 2, 3, 4, 5, 6] >>> l2 = … Read more