Hey Guys
I am trying to use itertools.izip_longest to read a large file in chunks based on the examples I was able to find on the web. However I am not able to understand the behaviour of the following python code. (contrived form of example) for x in itertools.izip_longest(*[iter([1,2,3])]*2): print x ###output: (1, 2) (3, None) It gives me the right answer but I am not sure how it is doing it. I also referred to the itertools doc but could not comprehend much. In essence I am trying to understand the intracacies of the following documentation from the itertools package. "The left-to-right evaluation order of the iterables is guaranteed. This makes possible an idiom for clustering a data series into n-length groups using izip(*[iter(s)]*n)." How is *n able to group the data and the meaning of '*' in the beginning just after izip. Thanks! -Abhi _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor