is_iterable function.

Duncan Booth duncan.booth at invalid.invalid
Wed Jul 25 15:41:12 EDT 2007


Neil Cerutti <horpner at yahoo.com> wrote:

> Speaking of the iter builtin function, is there an example of the
> use of the optional sentinel object somewhere I could see?

for line in iter(open('somefile.txt', 'r').readline, ''):
	print line




More information about the Python-list mailing list