Python Zero to Heros

Online Absolute Beginner Python Tutorials 

Every Sunday 2pm (UK time/ BST)

Get this slide deck:


Beginner topics:

Python objects - int, float, str, list, dict, bool

Control flows - if-else, for loop, while loop

Functions, modeuls, classes and decorators

strings operations and regex with re


pytest with fixtures and mock

property-based testing

python linters & auto-formatters


Intermedite topics:

Iterators, generators, async

Why documentation is important?

  • For users (including you) to understand the code
  • As a quick reference
  • Avoid mistakes

In Python

Use # as comments, which acts as notes


But that's not good enough


Docstrings is embedded in the Python object and can be called as reference

Style in Docstrings


- Google style


- Numpy style

Let's try it




Sphinx is a documentation generator written and used by the Python community. It is written in Python, and also used in other environments. 

- Wikipedia


The good thing about using Sphinx - it turns your docstrings into a website!

Documentation site generation flow



pages in rst

html pages


read the doc/ gh pages

Nothing better than a real example

Next week:

Sunday 2pm (UK time/ BST)

There are also Mid Meet Py every Wednesday 1pm

Python Docs

By Cheuk Ting Ho

Python Docs

  • 1,123