Python conventions

Variables names are in lower case with underscores used to separate words, as needed.

Constant names are in upper case with underscores used to separate words, as needed.

Indent four spaces in the body of a function definition.

Separate functions with blank lines.

Restrict lines to 79 characters. Use a backslash to continue a line.

A docstring in Python is put right after the function header. Multiple lines are fine. Use three double quotes to start and end.

Indent four spaces in the body of a while loop.

Indent four spaces in the body of a for loop.

Put a blank line between a class header and the docstring for the class.

In the docstring for the class, give the summary, list methods, and list attributes.

Docstrings for methods are like docstrings for functions.

Put blank lines between the docstring for the class and the methods.

Capitalize class names.

The conventions for method names are the same as those for function names.