Glossary
Block
Code blocks in Python
In Python, code block refers to a collection of code that is in the same block or indent. This is most commonly found in classes, functions, and loops.
You can where code blocks are because they are 1) on the same indent and 2) are uninterrupted by other lines of code not on the same indent.
Python code blocks are useful because they tell you what pieces of code will run as a part of a loop, class, or function.
Letβs take a look at a python to assign a variable code sample.