[Tutor] f.readlines(size)

2017-06-06 Thread Nancy Pham-Nguyen via Tutor
Resend with my member's email address. Hi, I'm trying to understand the optional size argument in file.readlines method. The help(file) shows:  |  readlines(...) |      readlines([size]) -> list of strings, each a line from the file. |       |      Call readline() repeatedly and return a list

Re: [Tutor] f.readlines(size)

2017-06-07 Thread Nancy Pham-Nguyen via Tutor
Hi Peter, Thanks a lot for pointing out the itertools.islice, itertools.izip_longest, and experimenting with readlines(size).I'm using Python 2 (you got me, a newbie learning readlines from Google's Python page). I used the itertools.islice and it worked like a charm. izip requires so many argum