docs: Python3-ize the examples

This commit updates the examples to conform to Python 3 instead
of Python 2, as Python 3 is more acceptable these days.
2 files changed