Python formatting enhancements

This commit fixes several issues:

* Some extra whitepsace in the source
* Output and source examples missing line breaks
* Syntax highlighting