Python source code included in the org-mode HOWTO displays correctly for very simple functions, such as where the Python indenting is only one level deep (i.e. four characters of whitespace as per PEP8 compliance).
However when an example includes nested indented blocks, such as in some of the encryption and signature verification examples), though the source code displays correctly in the org file and, of course, in the source block itself (which uses the correct python-mode in Emacs), it does not export to HTML or XHTML correctly and retaining the nested indenting.
It is not yet clear whether this is a configuration issue at my end, a known issue with certain export/publishing formats or a bug in org-mode and/or org-babel.
Currently using Emacs 25.3 and the latest release of Org-Mode (9.1.13); further testing required.