Re: [Tutor] help with itertools.izip_longest

2013-03-16 Thread Abhishek Pratap
On Sat, Mar 16, 2013 at 2:53 PM, Peter Otten <__pete...@web.de> wrote: > Abhishek Pratap wrote: > >> 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

Re: [Tutor] help with itertools.izip_longest

2013-03-16 Thread Peter Otten
Abhishek Pratap wrote: > 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.izi

Re: [Tutor] help with itertools.izip_longest

2013-03-16 Thread Abhishek Pratap
On Sat, Mar 16, 2013 at 2:32 PM, Oscar Benjamin wrote: > On 16 March 2013 21:14, Abhishek Pratap wrote: >> 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 beh

Re: [Tutor] help with itertools.izip_longest

2013-03-16 Thread Oscar Benjamin
On 16 March 2013 21:14, Abhishek Pratap wrote: > 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 examp

[Tutor] help with itertools.izip_longest

2013-03-16 Thread Abhishek Pratap
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)