[EMAIL PROTECTED] wrote: > import itertools > f = open("blah.txt", "r") > for c in itertools.chain(*f): > print c > # ... > > The "f" is iterable itself, yielding a new line from the file every time. > Lines are iterable as well, so the itertools.chain iterates through each > line and yields a character.
As far as I can tell, that code is just going to read the whole file in when Python does the *arg expansion. What's the point? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list