What is Indented Block in Python
Indentation refers to the spaces at the beginning of a code line.
Python uses indentation to indicate a block of code.
Where in other programming languages the indentation in code is for readability only, the indentation in Python is very important.
If you miss out to provide required indentation in your code, the interpreter while running throws an error like this:
IndentationError: expected an indented block
This means that you have skipped the indentation in some part of your code, probably the line number will also be shown in the error.
Please login to comment
View all comments