python:Doctest-based testing

The key is the interactive session strings
within triple quotes.
python:itertools groupby

This is the introduction for intertools.