r...@zedat.fu-berlin.de (Stefan Ram) writes: ... > So I was looking for a predefined object from the standard > library that already /is/ an iterator (with no need to use > »iter«). > > I found exactly one such object (which can be used after a > »from ... import ...« statement). Can you guess what it is?
Well, there's sys.stdin. But I would expect beginning students to find the effect of typing "next(sys.stdin)" to the commnd prompt to be a bit confusing... -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list