Chris Angelico:
But both this and your example of case conversion are, fundamentally, iterating over the string. What if you aren't doing that? What if you want to parse and process?
Parsing is also normally a scanning operation. If you want to process pieces of the string based on the parse then you remember the positions (as iterators) at the significant places and extract/process the data based on those positions.
Neil -- http://mail.python.org/mailman/listinfo/python-list