Skip to content

Style

PEP-8

PEP-8 is a style guide for Python code.

Indentation

Use 4 spaces as the TAB length as stated by (https://www.python.org/dev/peps/pep-0008/#indentation)-

Long strings

Implicit concatenation might be the cleanest solution:

s = "this is my really, really, really, really, really, really," \
    " really long string that I'd like to shorten."

Packages

pprint

pprint is a Python module provides a capability to “pretty-print” arbitrary Python data structures in a form which can be used as input to the interpreter.

import pprint

things = 

pprint.pprint(things)

The documentation can be found (https://docs.python.org/3/library/pprint.html).