Python style and example programs

There is no one "right" way to write a Python program. Wait, I retract that statement, because there is an official Style Guide for Python Code and also one for Docstring Conventions. These documents give excellent advice that you should follow, unless you have a good, specific reason not to.

It can be helpful to read existing code to get a better idea of how to organize your own programs. Here are some good examples of short Python programs, with explanations: