The unofficial CircuitPython Reference

indentation

description

Python and circuitPython uses indentation to organize code into blocks. It is a key feature that simplifies code editing and makes reading code easier as well. Indentation is required in many instances. The size of the indent (how many spaces or tabs) is up to the programmer. Many editors, such as MU, VSCode, Atom, etc, will have settings to control the depth of indentation.

syntax

methods

parameters

returns

example code

serial output:

see also: