The big deal about indentation

In many programming languages, you're encouraged—but not required—to indent a chunk of code that works as a unit. Some programmers are notoriously lazy about making their code readable to humans, and that means programs in those languages may not include indentation.

In Python, however, indentation is built into the interpreter. Code that's part of a block must be indented, or else you get an error message. This is one of the features that makes Python especially readable.

Indentation is so important to Python that Pythonistas printed up a T-shirt:


programming the way Guido indented it

Was this article helpful?

0 0

Post a comment